archive_assess_add.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 = "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 = StrUtil.getNullStr(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("add")) {
  76.    UserAssessMgr uam = new UserAssessMgr();
  77.    boolean re = false;
  78.    try {  
  79.  re = uam.create(request);
  80.    }
  81.    catch(ErrMsgException e){
  82.  out.print(StrUtil.Alert(e.getMessage()));
  83.    }
  84.    if (re) {
  85.  out.print(StrUtil.Alert_Redirect(SkinUtil.LoadString(request,"res.module.archive", "success_add_assess"),"archive_assess_list.jsp?userName=" + userName));
  86.    } 
  87. }
  88. %>
  89. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  90. <%@ include file="archive_inc_menu_top.jsp"%>
  91. <%
  92. UserInfoDb uid = new UserInfoDb();
  93. uid = uid.getUserInfoDb(userName);
  94. String userRealName = uid.getUserRealName();
  95. BasicDataMgr bdm = new BasicDataMgr("archive");
  96. String options = "";
  97. %>
  98. <br>
  99. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  100. <form action="?op=add" name="form1" method="post">
  101.   <tbody>
  102.     <tr>
  103.       <td colspan="2" noWrap class="right-title">添加考核信息</td>
  104.     </tr>
  105.     <tr>
  106.       <td class="TableContent" noWrap>用户名称:</td>
  107.         <td colSpan="2"><input maxLength="100" name="userRealName" size="20" readonly value="<%=userRealName%>"><input name="userName" type="hidden" value="<%=userName%>"></td>
  108.     </tr>
  109.     <tr>
  110.       <td class="TableContent" noWrap>考核年度:</td>
  111.       <td class="TableData"><input name="assessYear" id="assessYear" size="36" maxlength="200"></td>
  112.     </tr>
  113.     <tr>
  114.       <td class="TableContent" noWrap>考核情况:</td>
  115.       <td class="TableData"><input name="info" id="info" size="36" maxLength="200"></td>
  116.     </tr>
  117.     <tr>
  118.       <td class="TableContent" noWrap>审批时间:</td>
  119.       <td class="TableData"><input name="myDate" id="myDate" size="20" readonly>
  120.         <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>
  121.     </tr>
  122.     <tr>
  123.       <td class="TableContent" noWrap>考核结果:</td>
  124.       <td class="TableData">
  125.   <%options = bdm.getOptionsStr("result");%>
  126.   <select name="result">
  127.   <%=options%>
  128.       </select>
  129.   </td>
  130.     </tr>
  131.     
  132.     <tr>
  133.       <td class="TableContent" noWrap>备注:</td>
  134.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"></textarea></td>
  135.     </tr>
  136.     <tr class="TableControl" align="middle">
  137.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  138.         &nbsp;&nbsp;
  139.           <input name="button" type="reset" class="BigButton" value="重填">
  140.         &nbsp;&nbsp;</td>
  141.     </tr>
  142.   </tbody>
  143.   </form>
  144. </table>
  145. </body>
  146. </html>