ViewBillHotelBook.jsp
10.1 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
291
292
293
294
295
296
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.math.*" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page"/>
<jsp:useBean id="BrowserComInfo" class="weaver.workflow.field.BrowserComInfo" scope="page"/>
<%
boolean canview=HrmUserVarify.checkUserRight("ViewRequest:View", user);
boolean canactive=HrmUserVarify.checkUserRight("ViewRequest:Active", user);
int requestid=Util.getIntValue(request.getParameter("requestid"),0);
int start =Util.getIntValue(request.getParameter("start"),1);
String isrequest=Util.null2String(request.getParameter("isrequest"));
String logintype = user.getLogintype();
String requestname="";
String requestlevel="";
int workflowid=0;
int formid=0;
int billid=0;
int nodeid=0;
String nodetype="";
int userid=user.getUID();
int hasright=0;
String status="";
int creater=0;
int deleted=0;
int isremark=0;
int creatertype = 0;
int usertype = 0;
if(logintype.equals("1"))
usertype = 0;
if(logintype.equals("2"))
usertype = 1;
char flag=Util.getSeparator() ;
RecordSet.executeProc("workflow_Requestbase_SByID",requestid+"");
if(RecordSet.next()){
workflowid=RecordSet.getInt("workflowid");
nodeid=RecordSet.getInt("currentnodeid");
nodetype=RecordSet.getString("currentnodetype");
requestname=RecordSet.getString("requestname");
status=RecordSet.getString("status");
creater=RecordSet.getInt("creater");
deleted=RecordSet.getInt("deleted");
creatertype = RecordSet.getInt("creatertype");
requestlevel=RecordSet.getString("requestlevel");
}
if(isrequest.equals("1")) canview=true;
if(creater==userid && creatertype==usertype){
canview=true;
canactive=true;
}
RecordSet.executeProc("workflow_currentoperator_SByUs",userid+""+flag+""+usertype+flag+requestid+"");
if(RecordSet.next()) canview=true;
RecordSet.executeSql("select * from workflow_currentoperator where requestid="+requestid+" and userid="+userid+"and usertype = "+usertype+" and isremark='0'");
if(RecordSet.next()){
hasright=1;
}
RecordSet.executeSql("select * from workflow_currentoperator where requestid="+requestid+" and userid="+userid+" and usertype="+ usertype + " and isremark='1'");
if(RecordSet.next()){
isremark=1;
}
if(hasright==1 ||isremark==1){
canview=true;
canactive=true;
}
RecordSet.executeProc("workflow_form_SByRequestid",requestid+"");
RecordSet.next();
formid=RecordSet.getInt("billformid");
billid=RecordSet.getInt("billid");
String resourceid="";
%>
<form name="frmmain" method="post" action="BillHotelBookOperation.jsp">
<input type=hidden name="requestid" value=<%=requestid%>>
<input type=hidden name="workflowid" value=<%=workflowid%>>
<input type=hidden name="nodeid" value=<%=nodeid%>>
<input type=hidden name="nodetype" value=<%=nodetype%>>
<input type=hidden name="src" value="active">
<input type=hidden name="iscreate" value="0">
<input type=hidden name="formid" value=<%=formid%>>
<input type=hidden name="billid" value=<%=billid%>>
<div>
<BUTTON class=btn accessKey=R onClick="location.href='WorkflowMonitor.jsp?start=<%=start%>'"><U>R</U>-返回</BUTTON>
</div>
<table class=form>
<colgroup> <col width="20%"> <col width="80%">
<tr class=separator>
<td class=Sep1 colspan=4></td>
</tr>
<tr>
<td>说明</td>
<td class=field colspan=3>
<%=Util.toScreen(requestname,user.getLanguage())%>
<input type=hidden name=requestname value="<%=Util.toScreenToEdit(requestname,user.getLanguage())%>">
<span id=levelspan>
<%if(requestlevel.equals("0")){%>正常 <%}%>
<%if(requestlevel.equals("1")){%>重要 <%}%>
<%if(requestlevel.equals("2")){%>紧急 <%}%>
</span>
</td>
</tr>
<%
ArrayList fieldids=new ArrayList();
ArrayList fieldnames=new ArrayList();
ArrayList fieldvalues=new ArrayList();
ArrayList fieldlabels=new ArrayList();
ArrayList fieldhtmltypes=new ArrayList();
ArrayList fieldtypes=new ArrayList();
RecordSet.executeProc("workflow_billfield_Select",formid+"");
while(RecordSet.next()){
fieldids.add(RecordSet.getString("id"));
fieldnames.add(RecordSet.getString("fieldname"));
fieldlabels.add(RecordSet.getString("fieldlabel"));
fieldhtmltypes.add(RecordSet.getString("fieldhtmltype"));
fieldtypes.add(RecordSet.getString("type"));
}
RecordSet.executeProc("Bill_HotelBook_SelectByID",billid+"");
RecordSet.next();
resourceid=RecordSet.getString("resourceid");
for(int i=0;i<fieldids.size();i++){
String fieldname=(String)fieldnames.get(i);
fieldvalues.add(RecordSet.getString(fieldname));
}
ArrayList isviews=new ArrayList();
ArrayList isedits=new ArrayList();
ArrayList ismands=new ArrayList();
RecordSet.executeProc("workflow_FieldForm_Select",nodeid+"");
while(RecordSet.next()){
isviews.add(RecordSet.getString("isview"));
isedits.add(RecordSet.getString("isedit"));
ismands.add(RecordSet.getString("ismandatory"));
}
for(int i=0;i<fieldids.size();i++){
String fieldid=(String)fieldids.get(i);
String fieldvalue=(String)fieldvalues.get(i);
String fieldname=(String)fieldnames.get(i);
String isview=(String)isviews.get(i);
String isedit=(String)isedits.get(i);
String ismand=(String)ismands.get(i);
String fieldhtmltype=(String)fieldhtmltypes.get(i);
String fieldtype=(String)fieldtypes.get(i);
String fieldlable=SystemEnv.getHtmlLabelName(Util.getIntValue((String)fieldlabels.get(i),0),user.getLanguage());
if(isview.equals("1")){
%>
<tr>
<%if(fieldhtmltype.equals("2")){%>
<td valign=top><%=Util.toScreen(fieldlable,user.getLanguage())%></td>
<%}else{%>
<td><%=Util.toScreen(fieldlable,user.getLanguage())%></td>
<%}%>
<td class=field>
<%
if(fieldhtmltype.equals("1")){%>
<%=Util.toScreen(fieldvalue,user.getLanguage())%>
<% }
else if(fieldhtmltype.equals("2")){%>
<%=Util.toScreen(fieldvalue,user.getLanguage())%>
<%
}
else if(fieldhtmltype.equals("3")){
String showname="" ;
String showid="" ;
String sql="";
String url=BrowserComInfo.getBrowserurl(fieldtype);
String linkurl = Util.null2String(BrowserComInfo.getLinkurl(fieldtype));
if(fieldtype.equals("2") || fieldtype.equals("19")){%>
<%=fieldvalue%>
<%}
else if(fieldtype.equals("17")|| fieldtype.equals("18")){
String tablename=BrowserComInfo.getBrowsertablename(fieldtype);
String columname=BrowserComInfo.getBrowsercolumname(fieldtype);
String keycolumname=BrowserComInfo.getBrowserkeycolumname(fieldtype);
if(fieldvalue.equals(""))
fieldvalue="0";
sql="select "+keycolumname+","+columname+" from "+tablename+" where "+keycolumname+" in( "+fieldvalue+")";
RecordSet.executeSql(sql);
while(RecordSet.next()){
showid = RecordSet.getString(1);
showname=RecordSet.getString(2);
if(!linkurl.equals("")){
%>
<a href='<%=linkurl%><%=showid%>'><%}%>
<%=Util.toScreen(showname,user.getLanguage())%>
<%if(!linkurl.equals("")){%></a><%}
}
}else {
int intfieldvalue=Util.getIntValue(fieldvalue,0);
String tablename=BrowserComInfo.getBrowsertablename(fieldtype);
String columname=BrowserComInfo.getBrowsercolumname(fieldtype);
String keycolumname=BrowserComInfo.getBrowserkeycolumname(fieldtype);
sql="select "+columname+" from "+tablename+" where "+keycolumname+"="+intfieldvalue;
RecordSet.executeSql(sql);
RecordSet.next();
showname=RecordSet.getString(1);
if(!linkurl.equals("")){
%>
<a href='<%=linkurl%><%=intfieldvalue%>'><%}%><%=Util.toScreen(showname,user.getLanguage())%><%if(!linkurl.equals("")){%></a>
<%}
}
}
else if(fieldhtmltype.equals("4")){
%>
<input type=checkbox value=1 name="field<%=fieldid%>" DISABLED <%if(fieldvalue.equals("1")){%> checked <%}%>>
<%}else if(fieldhtmltype.equals("5")){
if(fieldname.equals("payterm")){
%>
<select name="payterm" size=1 DISABLED >
<option value="0" <%if(fieldvalue.equals("0")){%> selected <%}%>>老三样</option>
<option value="1" <%if(fieldvalue.equals("1")){%> selected <%}%>>自己支付</option>
<option value="2" <%if(fieldvalue.equals("2")){%> selected <%}%>>公司全付</option>
</select>
<%
continue;
}
}
%>
</td>
</tr>
<%
}
}
RecordSet.executeProc("bill_HotelBookDetail_SByBooki",billid+"");
if(RecordSet.getCounts()>0){
%>
<tr>
<td>宾馆预定详细信息</td>
<td> </td>
</tr>
<tr class=Section>
<td colspan=2>
<table class=form>
<!-- 详细信息 -->
<TR class=separator>
<TD class=Sep1></TD></TR>
<tr><td>
<table Class=ListShort cols=4 id="oTable1">
<COLGROUP>
<COL width="10%"><COL width="35%"> <COL width="35%"><COL width="20%">
<tr class=header>
<td> </td>
<td>宾馆名称</td>
<td>房型</td>
<td>房间数</td>
</tr>
<%
}
boolean islight=true;
while(RecordSet.next()){
String curhotelid=RecordSet.getString("hotelid");
String curroomstyle=RecordSet.getString("roomstyle");
String curroomsum=RecordSet.getString("roomsum");
String curhotelname=CustomerInfoComInfo.getCustomerInfoname(curhotelid);
%>
<tr <%if(islight){%> class=datalight <%} else {%> class=datadark <%}%>>
<td> </td>
<td><a href="/CRM/data/ViewCustomer.jsp?CustomerID=<%=curhotelid%>"><%=Util.toScreen(curhotelname,user.getLanguage())%></a></td>
<td><%=Util.toScreen(curroomstyle,user.getLanguage())%></td>
<td><%=Util.toScreen(curroomsum,user.getLanguage())%></td>
</tr>
<%
}
%>
</table>
</td></tr>
</table>
<br>
<%@ include file="/workflow/request/WorkflowViewSign.jsp" %>
</form>
<script language=javascript>
function doEdit(){
document.frmmain.action="ManageRequest.jsp";
document.frmmain.submit();
}
</script>
</body>
</html>