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

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 = "com.redmoon.oa.archive.*"%>
  6. <%@ page import = "com.redmoon.oa.person.*"%>
  7. <%@ page import = "cn.js.fan.web.*"%>
  8. <%@ page import = "com.redmoon.oa.BasicDataMgr"%>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>考核添加</title>
  14. <link href="../common.css" rel="stylesheet" type="text/css">
  15. <script language="JavaScript" type="text/JavaScript">
  16. <!--
  17. function findObj(theObj, theDoc)
  18. {
  19.   var p, i, foundObj;
  20.   
  21.   if(!theDoc) theDoc = document;
  22.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  23.   {
  24.     theDoc = parent.frames[theObj.substring(p+1)].document;
  25.     theObj = theObj.substring(0,p);
  26.   }
  27.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  28.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  29.     foundObj = theDoc.forms[i][theObj];
  30.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  31.     foundObj = findObj(theObj,theDoc.layers[i].document);
  32.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  33.   
  34.   return foundObj;
  35. }
  36. var GetDate=""; 
  37. function SelectDate(ObjName,FormatDate){
  38. var PostAtt = new Array;
  39. PostAtt[0]= FormatDate;
  40. PostAtt[1]= findObj(ObjName);
  41. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  42. }
  43. function SetDate()
  44. findObj(ObjName).value = GetDate; 
  45. }
  46. function chkContent(){
  47.    if(form1.userName.value == ""){
  48.      alert("用户名不能为空!")
  49.  form1.userName.focus();
  50.  return false
  51.    }
  52. }
  53. function setPerson(deptCode, deptName, user, userRealName)
  54. {
  55. form1.userName.value = user;
  56. form1.userRealName.value = userRealName;
  57. }
  58. //-->
  59. </script>
  60. <style type="text/css">
  61. <!--
  62. .style2 {font-size: 14px}
  63. -->
  64. </style>
  65. </head>
  66. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  67. <jsp:useBean id="archivePrivilege" scope="page" class="com.redmoon.oa.archive.ArchivePrivilege"/>
  68. <%
  69. String userName = ParamUtil.get(request,"userName");
  70. if (!privilege.isUserPrivValid(request, "archive.assess")||!archivePrivilege.canAdminUser(request,userName)) {
  71. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  72. return;
  73. }
  74. String op = ParamUtil.get(request,"op");
  75. if (op.equals("modify")) {
  76.    UserAssessMgr uam = new UserAssessMgr();
  77.    boolean re = false;
  78.    try {  
  79.  re = uam.modify(request);
  80.    }
  81.    catch(ErrMsgException e){
  82.  out.print(StrUtil.Alert(e.getMessage()));
  83.    }
  84.    if (re) {
  85.  out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.module.archive", "success_modify_assess")));
  86.    } 
  87. }
  88. %>
  89. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  90. <%@ include file="archive_inc_menu_top.jsp"%>
  91. <%
  92. String strId = ParamUtil.get(request, "id");
  93. if (!StrUtil.isNumeric(strId)) {
  94. out.println(StrUtil.Alert_Back(SkinUtil.LoadString(request, "res.module.archive","warn_id_err_archive")));
  95. return;
  96. }
  97. int id = Integer.parseInt(strId);
  98. UserAssessDb uad = new UserAssessDb();
  99. uad = uad.getUserAssessDb(id);
  100. UserInfoDb uid = new UserInfoDb();
  101. uid = uid.getUserInfoDb(userName);
  102. String userRealName = uid.getUserRealName();
  103. BasicDataMgr bdm = new BasicDataMgr("archive");
  104. String options = "";
  105. %>
  106. <br>
  107. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  108. <form action="?op=modify&id=<%=id%>" name="form1" method="post">
  109.   <tbody>
  110.     <tr>
  111.       <td colspan="2" noWrap class="right-title">修改考核信息</td>
  112.     </tr>
  113.     <tr>
  114.       <td class="TableContent" noWrap>用户名称:</td>
  115.       <td class="TableData"><input maxLength="100" name="userRealName" size="20" readonly value="<%=userRealName%>"><input name="userName" type="hidden" value="<%=userName%>"></td>
  116.     </tr>
  117.     <tr>
  118.       <td class="TableContent" noWrap>考核年度:</td>
  119.       <td class="TableData"><input name="assessYear" id="assessYear" size="36" maxlength="200" value="<%=uad.getAssessYear()%>"></td>
  120.     </tr>
  121.     <tr>
  122.       <td class="TableContent" noWrap>考核情况:</td>
  123.       <td class="TableData"><input name="info" id="info" size="36" maxLength="200" value="<%=uad.getInfo()%>"></td>
  124.     </tr>
  125.     <tr>
  126.       <td class="TableContent" noWrap>审批时间:</td>
  127.       <td class="TableData"><input name="myDate" id="myDate" size="20" value="<%=uad.getMyDate()%>" readonly>
  128.         <img style="CURSOR: hand" onClick="SelectDate('myDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26">日期格式形如 1999-1-2</td>
  129.     </tr>
  130.     <tr>
  131.       <td class="TableContent" noWrap>考核结果:</td>
  132.       <td class="TableData">
  133.     <%options = bdm.getOptionsStr("result");%>
  134. <select name="result">
  135. <%=options%>
  136.         </select>
  137. <script language="JavaScript">
  138. <!--
  139. form1.result.value="<%=uad.getResult()%>";
  140. //-->
  141. </script>
  142.   </td>
  143.     </tr>
  144.     
  145.     <tr>
  146.       <td class="TableContent" noWrap>备注:</td>
  147.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"><%=uad.getRemark()%></textarea></td>
  148.     </tr>
  149.     <tr class="TableControl" align="middle">
  150.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  151.         &nbsp;&nbsp;
  152.           <input name="button" type="reset" class="BigButton" value="重填">
  153.         &nbsp;&nbsp;</td>
  154.     </tr>
  155.   </tbody>
  156.   </form>
  157. </table>
  158. </body>
  159. </html>