vehicle_show.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.vehicle.*"%>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>车辆信息编辑</title>
  11. <link href="../common.css" rel="stylesheet" type="text/css">
  12. <style type="text/css">
  13. <!--
  14. .style2 {font-size: 14px}
  15. -->
  16. </style>
  17. <script language="JavaScript" type="text/JavaScript">
  18. <!--
  19. function findObj(theObj, theDoc)
  20. {
  21.   var p, i, foundObj;
  22.   
  23.   if(!theDoc) theDoc = document;
  24.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  25.   {
  26.     theDoc = parent.frames[theObj.substring(p+1)].document;
  27.     theObj = theObj.substring(0,p);
  28.   }
  29.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  30.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  31.     foundObj = theDoc.forms[i][theObj];
  32.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  33.     foundObj = findObj(theObj,theDoc.layers[i].document);
  34.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  35.   
  36.   return foundObj;
  37. }
  38. var GetDate=""; 
  39. function SelectDate(ObjName,FormatDate){
  40. var PostAtt = new Array;
  41. PostAtt[0]= FormatDate;
  42. PostAtt[1]= findObj(ObjName);
  43. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  44. }
  45. function SetDate()
  46. findObj(ObjName).value = GetDate; 
  47. }
  48. //-->
  49. </script>
  50. </head>
  51. <body>
  52. <%
  53. String oldLicenseNo = ParamUtil.get(request, "licenseNo");
  54. VehicleMgr vm = new VehicleMgr();
  55. VehicleDb vd = null;
  56. try {
  57. vd = vm.getVehicleDb(oldLicenseNo);
  58. }
  59. catch (ErrMsgException e) {
  60. out.print(SkinUtil.makeErrMsg(request, e.getMessage()));
  61. return;
  62. }
  63. String buyDate = DateUtil.format(vd.getBuyDate(), "yyyy-MM-dd");
  64. %>
  65. <%@ include file="vehicle_inc_menu_top.jsp"%>
  66. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  67. <%
  68. if (!privilege.isUserPrivValid(request, "vehicle")) {
  69. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  70. return;
  71. }
  72. %>
  73. <br>
  74. <table width="70%" border="0" align="center" cellPadding="2" cellSpacing="1" bgcolor="#FFFFFF" class="tableframe">
  75.     <tbody>
  76.   <tr>
  77. <td colspan="3" class="right-title">车辆信息</td>
  78.   </tr>
  79.       <tr>
  80.         <td noWrap width="80">车牌号:</td>
  81.         <td><%=vd.getLicenseNo()%><input type="hidden" name="licenseNo" value="<%=vd.getLicenseNo()%>">
  82.         <input type="hidden" name="oldLicenseNo" value="<%=oldLicenseNo%>"></td>
  83.         <td width="250" rowSpan="6"><%if(vd.getImage().equals("")){%><center>暂无照片</center><%}else{%><img src="../<%=vd.getImage()%>"><%}%></td>
  84.       </tr>
  85.       <tr>
  86.         <td noWrap>厂牌型号:</td>
  87.         <td><%=vd.getBrand()%></td></tr>
  88.       <tr>
  89.         <td noWrap>发动机号:</td>
  90.         <td><%=vd.getEngineNo()%></td></tr>
  91.       <tr>
  92.         <td noWrap>车辆类型:</td>
  93.         <td><select name="type">
  94. <%
  95.   VehicleTypeDb vtd = new VehicleTypeDb();
  96.   String sql = "select id from vehicle_type";
  97.   Iterator ir = vtd.list(sql).iterator();
  98.   while (ir.hasNext()) {
  99.    vtd = (VehicleTypeDb)ir.next();
  100. %>
  101. <option value="<%=vtd.getId()%>" <%if(vd.getType()==vtd.getId()){%> selected <%}%>><%=vtd.getDescription()%></option>
  102. <%}%>
  103.           </select></td>
  104.       </tr>
  105.       <tr>
  106.         <td noWrap>驾驶员:</td>
  107.         <td><%=vd.getDriver()%></td></tr>
  108.       <tr>
  109.         <td noWrap>购买价格:</td>
  110.         <td><%=vd.getPrice()%></td></tr>
  111.       
  112.       <tr>
  113.         <td noWrap>购买日期:</td>
  114.         <td colSpan="2"><%=buyDate%></td>  
  115.       </tr>
  116.       <tr>
  117.         <td noWrap>当前状态:</td>
  118.         <td colSpan="2"><select name="state">
  119.             <option value="0" <%if(vd.getState() == 0){%> selected <%}%>>可用</option>
  120.             <option value="1" <%if(vd.getState() == 1){%> selected <%}%>>损坏</option>
  121.             <option value="2" <%if(vd.getState() == 2){%> selected <%}%>>报废</option>
  122.           </select></td>
  123.       </tr>
  124.       <tr>
  125.         <td noWrap>备注:</td>
  126.         <td colSpan="2"><%=vd.getRemark()%></td>
  127.       </tr>
  128.     </tbody>
  129. </table>
  130. </body>
  131. </html>