archive_rewards_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 = "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("modify")) {
  75.    UserRewardsMgr urm = new UserRewardsMgr();
  76.    boolean re = false;
  77.    try {  
  78.  re = urm.modify(request);
  79.    }
  80.    catch(ErrMsgException e){
  81.  out.print(StrUtil.Alert(e.getMessage()));
  82.    }
  83.    if (re) {
  84.  out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.module.archive", "success_modify_rewards")));
  85.    } 
  86. }
  87. %>
  88. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  89. <%@ include file="archive_inc_menu_top.jsp"%>
  90. <%
  91. String strId = ParamUtil.get(request, "id");
  92. if (!StrUtil.isNumeric(strId)) {
  93. out.println(StrUtil.Alert_Back(SkinUtil.LoadString(request, "res.module.archive","warn_id_err_archive")));
  94. return;
  95. }
  96. int id = Integer.parseInt(strId);
  97. UserRewardsDb urd = new UserRewardsDb();
  98. urd = urd.getUserRewardsDb(id);
  99. String userRealName = "";
  100. UserInfoDb uid = new UserInfoDb();
  101.     uid = uid.getUserInfoDb(urd.getUserName());
  102.     userRealName = uid.getUserRealName();
  103. %>
  104. <br>
  105. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  106. <form action="?op=modify&id=<%=id%>" name="form1" method="post">
  107.   <tbody>
  108.     <tr>
  109.       <td colspan="2" noWrap class="right-title">修改奖励信息</td>
  110.     </tr>
  111.     <tr>
  112.       <td class="TableContent" noWrap>用户名称:</td>
  113.       <td class="TableData"><input name="userRealName" id="userRealName" size="36" maxLength="200" value="<%=userRealName%>">
  114.         <input name="userName" type="hidden" value="<%=urd.getUserName()%>">
  115.       </td>
  116.     </tr>
  117.     <tr>
  118.       <td class="TableContent" noWrap>何时:</td>
  119.       <td class="TableData"><input name="myDate" id="myDate" size="20" value="<%=urd.getMyDate()%>" 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"><input name="place" id="place" size="36" maxLength="200" value="<%=urd.getPlace()%>"></td>
  125.     </tr>
  126.     <tr>
  127.       <td class="TableContent" noWrap>何种奖励:</td>
  128.       <td class="TableData"><input name="rewards" id="rewards" size="36" maxlength="200" value="<%=urd.getRewards()%>"></td>
  129.     </tr>
  130.     <tr>
  131.       <td class="TableContent" noWrap>主要事迹:</td>
  132.       <td class="TableData"><input name="reason" id="reason" size="36" maxLength="200" value="<%=urd.getReason()%>"></td>
  133.     </tr>
  134.     
  135.     <tr>
  136.       <td class="TableContent" noWrap>备注:</td>
  137.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"><%=urd.getRemark()%></textarea></td>
  138.     </tr>
  139.     <tr class="TableControl" align="middle">
  140.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  141.         &nbsp;&nbsp;
  142.           <input name="button" type="reset" class="BigButton" value="重填">
  143.         &nbsp;&nbsp;</td>
  144.     </tr>
  145.   </tbody>
  146.   </form>
  147. </table>
  148. </body>
  149. </html>