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

电子政务应用

开发平台:

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/validate.js"></script>
  29. <script language=javascript>
  30. function returnIt(form)
  31. {
  32.    form.action="/mainctrl/archive/returnArchiveRegister?borrowId=<%=borrowId%>";
  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.    form.action="/mainctrl/archive/deleteBorrowArchive?borrowId=<%=borrowId%>";
  46.    form.submit();
  47. }
  48. function checkIt(form)
  49. {
  50.   if(!isEmpty(form.returnDate.value))
  51.   {
  52.       if("<%=com.vnex.intranet.pub.BaseJdbcDAO.getDBSystemDate().toString()%>">form.returnDate.value)
  53.       {
  54.         alert("归还日期必须在本日之后");
  55.         return false;
  56.       }
  57.   }   
  58.   else
  59.   {
  60.       alert("请选择归还日期");   
  61.       return false;
  62.   }
  63.   return true;
  64. }
  65. </script>
  66. <input type="hidden" name="borrowId" value="<%=borrowId%>">
  67. <table width="600" border="0" cellpadding="5" cellspacing="1" class="iframestyle">
  68.    <tr>
  69.       <td colspan="2" height="4" bgcolor="#ffffff">&nbsp;&nbsp;<a href="/mainctrl/archive/todayArchives">档案管理</a>&gt;&gt;<a href="/mainctrl/archive/borrowManager">借阅档案管理</a>&gt;&gt;借阅详情
  70.       </td>
  71.    </tr>
  72.    <tr> 
  73.       <td colspan="2" height="4" bgcolor="#666666"><font class="strongw">借阅记录</font></td>
  74.    </tr>
  75.    <tr bgcolor="#FFFFFF"> 
  76.       <td align="center" colspan="2">
  77.         <table width="100%" border="0" cellspacing="0" cellpadding="0">
  78.            <tr>
  79.               <td>
  80.                 <table width="100%" border="0">
  81.                   <tr> 
  82.                     <td width="14%"> 
  83.                       <div align="left">借阅编号:</div>
  84.                     </td>
  85.                     <td width="86%"> 
  86.                       <div align="left"><%=brvb.getBorrowId()%> 
  87.                       </div>
  88.                     </td>
  89.                  </tr>
  90.                  <tr> 
  91.                     <td width="14%"> 
  92.                       <div align="left">借阅日期:</div>
  93.                     </td>
  94.                     <td width="86%"> 
  95.                       <div align="left"><%=TimeStamp.formatCalendar(TimeStamp.YMD, brvb.getBorrowDate())%>
  96.                       </div>
  97.                     </td>
  98.                  </tr>
  99.                  <tr> 
  100.                     <td width="14%"> 
  101.                       <div align="left">档案编号:</div>
  102.                     </td>
  103.                     <td width="86%"> 
  104.                        <div align="left"><%=displayId%> 
  105.                        </div>
  106.                     </td>
  107.                  </tr>
  108.                  <tr> 
  109.                     <td width="14%"> 
  110.                       <div align="left">档案标题:</div>
  111.                     </td>
  112.                     <td width="86%"> 
  113.                       <div align="left"><%=displayTitle%>
  114.                       </div>
  115.                     </td>
  116.                  </tr>
  117.                  <tr> 
  118.                     <td width="14%"> 
  119.                       <div align="left">借阅人:</div>
  120.                     </td>
  121.                     <td width="86%"> 
  122.                       <div align="left"><%=brvb.getBorrower()%>
  123.                       </div>
  124.                     </td>
  125.                  </tr>
  126.                  <tr> 
  127.                     <td width="14%"> 
  128.                       <div align="left">归还期限:</div>
  129.                     </td>
  130.                     <td width="86%"> 
  131.                       <div align="left"> 
  132.                         <input type="text" name="returnDate" readonly size="30" class="text" value="<%=returnDate%>">
  133.                         <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="选择借阅档案日期" onClick="fPopUpCalendarDlg(returnDate);return false">
  134.                       </div>
  135.                     </td>
  136.                  </tr>
  137.                  <tr> 
  138.                     <td width="14%"> 
  139.                       <div align="left">保密级别:</div>
  140.                     </td>
  141.                     <td width="86%"> 
  142.                       <div align="left"><%=safetyLevel%> 
  143.                      </div>
  144.                    </td>
  145.                </tr>
  146.           </table>
  147.          </td>
  148.        </tr>
  149.      </table>
  150.    </td>
  151.   </tr>
  152. </table>  
  153. <p> 
  154. <input type="button" value=" 归  还 " name="B251" class="button" onclick="returnIt(this.form)">
  155. &nbsp;&nbsp;&nbsp;
  156. <input type="button" value=" 修  改 " name="B252" class="button" onclick="modifyIt(this.form)">
  157. &nbsp;&nbsp;&nbsp;
  158. <input type="button" value=" 删  除 " name="B254" class="button" onclick="deleteIt(this.form)">
  159. &nbsp;&nbsp;&nbsp;
  160. <input type="button"  value=" 返  回 " name="B253" class="button" onclick="history.back()">
  161. &nbsp;&nbsp;&nbsp; 
  162. </p>