archive_rewards_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 = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.archive.*"%>
  7. <%@ page import = "com.redmoon.oa.person.*"%>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <title>考核添加</title>
  13. <link href="../common.css" rel="stylesheet" type="text/css">
  14. <script language="JavaScript" type="text/JavaScript">
  15. <!--
  16. function findObj(theObj, theDoc)
  17. {
  18.   var p, i, foundObj;
  19.   
  20.   if(!theDoc) theDoc = document;
  21.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  22.   {
  23.     theDoc = parent.frames[theObj.substring(p+1)].document;
  24.     theObj = theObj.substring(0,p);
  25.   }
  26.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  27.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  28.     foundObj = theDoc.forms[i][theObj];
  29.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  30.     foundObj = findObj(theObj,theDoc.layers[i].document);
  31.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  32.   
  33.   return foundObj;
  34. }
  35. var GetDate=""; 
  36. function SelectDate(ObjName,FormatDate){
  37. var PostAtt = new Array;
  38. PostAtt[0]= FormatDate;
  39. PostAtt[1]= findObj(ObjName);
  40. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  41. }
  42. function SetDate()
  43. findObj(ObjName).value = GetDate; 
  44. }
  45. function chkContent(){
  46.    if(form1.userName.value == ""){
  47.      alert("用户名不能为空!")
  48.  form1.userName.focus();
  49.  return false
  50.    }
  51. }
  52. function setPerson(deptCode, deptName, user, userRealName)
  53. {
  54. form1.userName.value = user;
  55. form1.userRealName.value = userRealName;
  56. }
  57. //-->
  58. </script>
  59. <style type="text/css">
  60. <!--
  61. .style2 {font-size: 14px}
  62. -->
  63. </style>
  64. </head>
  65. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  66. <jsp:useBean id="archivePrivilege" scope="page" class="com.redmoon.oa.archive.ArchivePrivilege"/>
  67. <% 
  68. String userName = ParamUtil.get(request,"userName");
  69.     if (!privilege.isUserPrivValid(request, "archive.rewards")||!archivePrivilege.canAdminUser(request,userName)) {
  70. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  71. return;
  72. }
  73. String op = ParamUtil.get(request,"op");
  74. if (op.equals("add")) {
  75.    UserRewardsMgr urm = new UserRewardsMgr();
  76.    boolean re = false;
  77.    try {  
  78.  re = urm.create(request);
  79.    }
  80.    catch(ErrMsgException e){
  81.  out.print(StrUtil.Alert(e.getMessage()));
  82.    }
  83.    if (re) {
  84.  out.print(StrUtil.Alert_Redirect(SkinUtil.LoadString(request,"res.module.archive", "success_add_rewards"),"archive_rewards_list.jsp?userName=" + userName));
  85.    } 
  86. }
  87. %>
  88. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  89. <%@ include file="archive_inc_menu_top.jsp"%>
  90. <%
  91. UserInfoDb uid = new UserInfoDb();
  92. uid = uid.getUserInfoDb(userName);
  93. String userRealName = uid.getUserRealName();
  94. %>
  95. <br>
  96. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  97. <form action="?op=add" name="form1" method="post">
  98.   <tbody>
  99.     <tr>
  100.       <td colspan="2" noWrap class="right-title">添加奖励信息</td>
  101.     </tr>
  102.     <tr>
  103.       <td class="TableContent" noWrap>用户名称:</td>
  104.         <td colSpan="2"><input maxLength="100" name="userRealName" size="20" readonly value="<%=userRealName%>"><input name="userName" type="hidden" value="<%=userName%>"></td>
  105.     </tr>
  106.     <tr>
  107.       <td class="TableContent" noWrap>何时:</td>
  108.       <td class="TableData"><input name="myDate" id="myDate" size="20" readonly>
  109.         <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>
  110.     </tr>
  111.     <tr>
  112.       <td class="TableContent" noWrap>何地:</td>
  113.       <td class="TableData"><input name="place" id="place" size="36" maxlength="200"></td>
  114.     </tr>
  115.     <tr>
  116.       <td class="TableContent" noWrap>何种奖励:</td>
  117.       <td class="TableData"><input name="rewards" id="rewards" size="36" maxlength="200"></td>
  118.     </tr>
  119.     <tr>
  120.       <td class="TableContent" noWrap>主要事迹:</td>
  121.       <td class="TableData"><input name="reason" id="reason" size="36" maxLength="200"></td>
  122.     </tr>
  123.     
  124.     <tr>
  125.       <td class="TableContent" noWrap>备注:</td>
  126.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"></textarea></td>
  127.     </tr>
  128.     <tr class="TableControl" align="middle">
  129.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  130.         &nbsp;&nbsp;
  131.           <input name="button" type="reset" class="BigButton" value="重填">
  132.         &nbsp;&nbsp;</td>
  133.     </tr>
  134.   </tbody>
  135.   </form>
  136. </table>
  137. </body>
  138. </html>