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

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.SkinUtil"%>
  6. <%@ page import = "com.redmoon.oa.officeequip.*"%>
  7. <%@ page import = "java.util.*"%>
  8. <%@ page import = "cn.js.fan.db.*"%>
  9. <%@ page import = "cn.js.fan.web.*"%>
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml">
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. <link href="../common.css" rel="stylesheet" type="text/css">
  15. <title>办公用品归还</title>
  16. </head>
  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. <body>
  51. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  52. <%
  53. String priv = "officeequip";
  54. if (!privilege.isUserPrivValid(request, priv))
  55. {
  56. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  57. return;
  58. }
  59.   int id = ParamUtil.getInt(request, "id");
  60.   OfficeOpDb ood = new OfficeOpDb();
  61.   ood = ood.getOfficeOpDb(id);
  62.   int officeId = ood.getOfficeId();
  63.   OfficeDb odb = new OfficeDb();
  64.   odb = odb.getOfficeDb(officeId);
  65.   int typeId = odb.getTypeId();
  66.   OfficeTypeDb otd = new OfficeTypeDb();
  67.   otd = otd.getOfficeTypeDb(typeId);
  68. %>
  69. <%      
  70.         OfficeOpMgr oom = new OfficeOpMgr();
  71. OfficeMgr   om = new OfficeMgr();
  72. String op = ParamUtil.get(request, "op");
  73. boolean re = false;
  74. boolean fe = false;
  75. if (op.equals("return")) {
  76. try {
  77. re = oom.returnOfficeEquip(request);
  78. fe = om.returnChageStorageCount(request);
  79. }
  80. catch (ErrMsgException e) {
  81. out.print(StrUtil.Alert_Back(e.getMessage()));
  82. }
  83. if (fe) {
  84. %>
  85. <script>
  86.   window.close();
  87.   window.opener.location.reload();
  88. </script>
  89. <%
  90. }
  91. }
  92. %>
  93. <form method="post" action="?op=return" name="form1" >
  94. <table width="100%" height="180" border="1" align="center" cellpadding="4" cellspacing="0" bordercolorlight="#000000" bordercolordark="#ffffff">
  95.   <tbody>
  96.     <tr>
  97.       <td  nowrap="nowrap"align="right" width="15%">用品类别:</td>
  98.       <td  nowrap="nowrap"width="35%"><%=odb.getOfficeName()%><input name="id" value="<%=ood.getId()%>" type=hidden></td>
  99.       <td  nowrap="nowrap"align="right" width="15%">用品名称:</td>
  100.       <td  nowrap="nowrap"width="35%"><%=otd.getName()%></td>
  101.     </tr>
  102.     <tr>
  103.       <td nowrap="nowrap" align="right">数量:</td>
  104.       <td nowrap="nowrap"><%=ood.getCount()%><input name="officeId" value="<%=ood.getOfficeId()%>" type=hidden>
  105.         <input name="count" value="<%=ood.getCount()%>" type="hidden" /></td>
  106.       <td nowrap="nowrap" align="right">借用时间:</td>
  107.       <td nowrap="nowrap"><%=ood.getOpDate()%></td>
  108.     </tr>
  109.     <tr>
  110.       <td nowrap="nowrap" align="right">借用人:</td>
  111.       <td nowrap="nowrap"> <%=ood.getPerson()%></td>
  112.       <td nowrap="nowrap" align="right">归还时间:</td>
  113.       <td nowrap="nowrap"> 
  114.   <%
  115.   Date d = new Date();
  116.   String dt = DateUtil.format(d, "yyyy-MM-dd");;
  117.      %>
  118.         <input name="endDate" type="text" id="endDate" size="20" value = "<%=dt%>"/>
  119.         <img style="CURSOR: hand" onclick="SelectDate('endDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absmiddle" border="0" width="26" height="26" /></td>
  120.     </tr>
  121.     <tr>
  122.       <td height="62" align="right">备注:</td>
  123.       <td colspan="3"><textarea  name="abstracts"  id="abstracts" style="width:100%" rows="8"></textarea></td>
  124.     </tr>
  125.   </tbody>
  126. </table>
  127. <p align="center"><input name="submit" type="submit" class="button1"  value="提  交" ></p>
  128. </form>
  129. </body>
  130. </html>