borrow_archive_detail.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:8k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  3. <%@ page import="com.vnex.intranet.util.TimeStamp" %>
  4. <%@ page import="com.vnex.intranet.archives.value.*" %>
  5. <jsp:useBean id="borrowProxy" scope="application" class="com.vnex.intranet.archives.proxy.BorrowProxyBean" />
  6. <jsp:useBean id="brvb" scope="request" class="com.vnex.intranet.archives.value.BorrowRecordValueBean" />
  7. <jsp:useBean id="archiveProxy" scope="application" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" />
  8. <%
  9.     String borrowId = request.getParameter("borrowId");
  10.     brvb = borrowProxy.getBorrowArchiveDetail(Integer.parseInt(borrowId));
  11.     ArchiveValueBean avb = archiveProxy.selectArchive(brvb.getArchiveId());
  12.     String displayId = avb.getArchiveDisplayId();
  13.     String displayTitle = avb.getArchiveTitle();
  14.     String safetyLevel = ""+avb.getSafetyLevel();
  15.     
  16.     String year = "";
  17.     String month = "";
  18.     String day = "";   
  19.     Calendar cal = brvb.getNeedReturnDate();
  20.     year = ""+cal.get(Calendar.YEAR);
  21.     int m = cal.get(Calendar.MONTH)+1;
  22.     int d = cal.get(Calendar.DAY_OF_MONTH);
  23.     month = m<10? "0"+m:""+m;
  24.     day = d<10? "0"+d:""+d;
  25.     String returnDate = year+"-"+month+"-"+day;
  26. %>
  27. <script Language="JavaScript" src="/vnex/util/Popup.js"></script>
  28. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  29. <script language=javascript>
  30. function returnIt(form)
  31. {
  32.    form.action="/mainctrl/archive/returnArchiveRegister?borrowId=<%=borrowId%>&displayId=<%=displayId%>";
  33.    form.submit();
  34. }
  35. function modifyIt(form)
  36. {
  37.    if(checkIt(form))
  38.    {
  39.       form.action="/mainctrl/archive/modifyBorrowArchive?borrowId=<%=borrowId%>";
  40.       form.submit();
  41.    }
  42. }
  43. function deleteIt(form)
  44. {
  45.    if(confirm("是否删除本记录?"))
  46.    {
  47.      form.action="/mainctrl/archive/deleteBorrowArchive?borrowId=<%=borrowId%>";
  48.      form.submit();
  49.    }  
  50. }
  51. function checkIt(form)
  52. {
  53.   if(!isEmpty(form.returnDate.value))
  54.   {
  55.       if("<%=com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate().toString()%>">form.returnDate.value)
  56.       {
  57.         alert("归还日期必须在本日之后");
  58.         return false;
  59.       }
  60.   }   
  61.   else
  62.   {
  63.       alert("请选择归还日期");   
  64.       return false;
  65.   }
  66.   return true;
  67. }
  68. </script>
  69. <HTML>
  70. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  71. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  72. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  73. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  74. <DIV align=center>
  75. <form name="form1" method="post">
  76.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  77.     <TBODY> 
  78.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  79.     <TR> 
  80.         <TD colSpan=3 align="center"><br>
  81.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  82.             <tr> 
  83.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  84.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  85.                   <tr bgcolor="#666666"> 
  86.                       <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/archives/main"><font color="#ffffff">档案管理</font></a>&gt;&gt;借阅详情</font>
  87.                       </td>
  88.                   </tr>
  89.                 </table>
  90.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  91.                   <tr bgcolor="#e0e0e0"> 
  92.                     <td width="14%"> 
  93.                       <div align="left"><strong>&nbsp;借阅编号:</strong></div>
  94.                     </td>
  95.                     <td width="86%"> 
  96.                       <div align="left"><%=brvb.getBorrowId()%> 
  97.                       </div>
  98.                     </td>
  99.                  </tr>
  100.                  <tr bgcolor="#fafafa"> 
  101.                     <td width="14%"> 
  102.                       <div align="left"><strong>&nbsp;借阅日期:</strong></div>
  103.                     </td>
  104.                     <td width="86%"> 
  105.                       <div align="left"><%=TimeStamp.formatCalendar(TimeStamp.YMD, brvb.getBorrowDate())%>
  106.                       </div>
  107.                     </td>
  108.                  </tr>
  109.                  <tr bgcolor="#e0e0e0"> 
  110.                     <td width="14%"> 
  111.                       <div align="left"><strong>&nbsp;档案编号:</strong></div>
  112.                     </td>
  113.                     <td width="86%"> 
  114.                        <div align="left"><%=displayId%> 
  115.                        </div>
  116.                     </td>
  117.                  </tr>
  118.                  <tr bgcolor="#fafafa"> 
  119.                     <td width="14%"> 
  120.                       <div align="left"><strong>&nbsp;档案标题:</strong></div>
  121.                     </td>
  122.                     <td width="86%"> 
  123.                       <div align="left"><%=displayTitle%>
  124.                       </div>
  125.                     </td>
  126.                  </tr>
  127.                  <tr bgcolor="#e0e0e0"> 
  128.                     <td width="14%"> 
  129.                       <div align="left"><strong>&nbsp;借阅人:</strong></div>
  130.                     </td>
  131.                     <td width="86%"> 
  132.                       <div align="left"><%=brvb.getBorrower()%>
  133.                       </div>
  134.                     </td>
  135.                  </tr>
  136.                  <tr bgcolor="#fafafa"> 
  137.                     <td width="14%"> 
  138.                       <div align="left"><strong>&nbsp;归还期限:</strong></div>
  139.                     </td>
  140.                     <td width="86%"> 
  141.                       <div align="left"> 
  142.                         <input type="text" name="returnDate" readonly size="30" class="text" value="<%=returnDate%>">
  143. <%
  144.             if(request.getParameter("history") != null && request.getParameter("history").equals("no"))
  145.             {
  146. %>                                    
  147.                         <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择借阅档案日期" onClick="fPopUpCalendarDlg(returnDate);return false">
  148. <%          }%>                        
  149.                       </div>
  150.                     </td>
  151.                  </tr>
  152.                  <tr bgcolor="#e0e0e0"> 
  153.                     <td width="14%"> 
  154.                       <div align="left"><strong>&nbsp;保密级别:</strong></div>
  155.                     </td>
  156.                     <td width="86%"> 
  157.                       <div align="left"><%=safetyLevel%> 
  158.                      </div>
  159.                    </td>
  160.                </tr>
  161.                <tr bgcolor="#fafafa">
  162.                   <td colspan="2" align="center" height="30">
  163. <%
  164.             if(request.getParameter("history") != null && request.getParameter("history").equals("no"))
  165.             {
  166. %>                                    
  167. <input type="button" value="归还" name="B251" class="text" onclick="returnIt(this.form)">
  168. &nbsp;&nbsp;
  169. <input type="button" value="保存" name="B252" class="text" onclick="modifyIt(this.form)">
  170. &nbsp;&nbsp;
  171. <%
  172.            }
  173.            else
  174.            {
  175. %>           
  176. <input type="button" value="删除" name="B254" class="text" onclick="deleteIt(this.form)">
  177. &nbsp;&nbsp;
  178. <%         }%>
  179. <input type="button"  value="返回" name="B253" class="text" onclick="history.back()">
  180.  </td>
  181.    </tr>
  182.              </table>
  183.          </td>
  184.        </tr>
  185.      </table>
  186.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  187.        </TD>
  188.      </TR>
  189.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  190.     </TBODY> 
  191.   </TABLE>
  192.     <BR>
  193.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  194. </form>
  195. </DIV>
  196. </BODY>
  197. </HTML>