29d7c9d24cc210e3e0efe7511270431c0a64ee0c.svn-base 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <%@include file="/page/include1.jsp" %>
  8. <script type="text/javascript" src="<%=path%>/scripts/business/em/event/EventAddEdit.js"></script>
  9. <style type="text/css">
  10. .class_color{
  11. background-color: rgb(237, 239, 253);
  12. }
  13. </style>
  14. <script type="text/javascript">
  15. var fd_id = "<%=request.getParameter("fd_id")%>";
  16. //取得用户真实名字
  17. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  18. //部门id
  19. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  20. //部门名称
  21. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  22. //父部门id
  23. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  24. var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
  25. $.post(deptUrl,{id:parentId,name:''},function(data){
  26. $("#WRITE_DEPT_394").data("data",data);
  27. $("#WRITE_DEPT_394").render();
  28. }, "json");
  29. function getNowFormatDate() {
  30. var date = allGetServerTime();
  31. var seperator1 = "-";
  32. var seperator2 = ":";
  33. var year = date.getFullYear();
  34. var month = date.getMonth() + 1;
  35. var strDate = date.getDate();
  36. var hour=date.getHours();
  37. var minu=date.getMinutes();
  38. var sec=date.getSeconds();
  39. if (month >= 1 && month <= 9) {
  40. month = "0" + month;
  41. }
  42. if (strDate >= 0 && strDate <= 9) {
  43. strDate = "0" + strDate;
  44. }
  45. if(hour>=0 && hour<=9){
  46. hour="0"+hour;
  47. }
  48. if(minu>=0 && minu<=9){
  49. minu="0"+minu;
  50. }
  51. if(sec>=0 && sec<=9){
  52. sec="0"+sec;
  53. }
  54. var currentdate = year + seperator1 + month + seperator1 + strDate
  55. + " " + hour + seperator2 + minu;
  56. return currentdate;
  57. }
  58. //页面初始化
  59. $(function(){
  60. $('#TYPE_394').initCanstSelect('BM_EMC_WarningName');
  61. $('#LEVEL_394').initCanstSelect('BM_EVENTLEVEL');
  62. //修改表单
  63. if(fd_id.length>0){
  64. $("#titleShow").text("修改突发事件信息");
  65. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  66. var params = {
  67. classid : '394',
  68. objectID : fd_id
  69. };
  70. $.request.query(url,params,function(data){
  71. $('#editForm').ajaxWrite({data:data});
  72. $('#editForm input[name="classid"]').val('394');
  73. });
  74. }else{//新增
  75. $("#titleShow").text("添加突发事件信息");
  76. $('#WRITE_TIME_394').val(getNowFormatDate());//填报时间
  77. $('#WRITER_394').val(realName);//填报人
  78. //默认选中登录人所属部门
  79. $('#WRITE_DEPT_394').attr('selectedValue',deptId);
  80. }
  81. $("#back").hover(function(){
  82. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  83. },function(){
  84. $(this).attr("src","/nwyj/images/temp/back.png");
  85. });
  86. })
  87. </script>
  88. <style type="text/css">
  89. body,div,ul,li,p{
  90. margin:0;
  91. padding:0;
  92. font-size: 14px;
  93. }
  94. .d_ground{
  95. border: 1px solid #cdcaca;
  96. background: white;
  97. width:1000px;
  98. }
  99. .fieldset{
  100. border-style:solid;
  101. border-width:1px;
  102. border-color:#cdcaca;
  103. margin:0px 20px 20px 20px;
  104. width: 935px
  105. }
  106. .button_jl{
  107. margin:10px 20px 0px 0px;
  108. float:right;
  109. }
  110. .back{
  111. margin:8px 0px 0px 15px;
  112. }
  113. </style>
  114. </head>
  115. <body style="width: 1000px; margin:0 auto; margin-top:15px" align="center" >
  116. <div class="d_ground" id="formContent" >
  117. <div style="height: 50px;background: white;" align="center">
  118. <a href="javascript:;"><img id="back" class="back" align="left" alt="返回" title="返回" src="/nwyj/images/temp/back.png"></img></a>
  119. <font style="font-weight: bold;font-size: 20px;line-height: 45px;color: #3e62a0" id="titleShow"></font>
  120. </div>
  121. <hr/>
  122. <form id="editForm" method="post">
  123. <div class="button_jl">
  124. <input value='保存' id='save' type='button'/>&nbsp;&nbsp;
  125. <input id='cancel' value='重置' type='reset'/>
  126. </div>
  127. <fieldset class="fieldset">
  128. <legend>基本信息:</legend>
  129. <table width="960px" class="tableStyle" align="center">
  130. <tr style="display:none;">
  131. <td colspan="2"><input type="hidden" name="classid" value="394" required="true"/></td>
  132. <td colspan="2">
  133. <input type="hidden" id="FD_OBJECTID394" name="FD_OBJECTID394" required="true"/>
  134. </td>
  135. </tr>
  136. <tr>
  137. <td align="right" width="120px" class="class_color"><span class="star">*</span>事件名称:</td>
  138. <td width="280px"><input type="text" style="width: 265px;" maxlength="50" name="EVENT_NAME_394" id="EVENT_NAME_394" class="validate[required,length[0,50]]"/></td>
  139. <td align="right" width="120px" class="class_color"><span class="star">*</span>事件类型:</td>
  140. <td width="280px"><select class="validate[required]" selWidth="270" prompt="请选择" name="TYPE_394" id="TYPE_394"></select></td>
  141. </tr>
  142. <tr>
  143. <td align="right" width="120px" class="class_color"><span class="star">*</span>事件级别:</td>
  144. <td><select class="validate[required]" prompt="请选择" selWidth="270" name="LEVEL_394" id="LEVEL_394"></select></td>
  145. <td align="right" width="120px" class="class_color"><span class="star">*</span>属地:</td>
  146. <td><input type="text" maxlength="50" style="width: 265px;" name="AREA_394" id="AREA_394" class="validate[required,length[0,50]]"/></td>
  147. </tr>
  148. <tr>
  149. <td align="right" width="120px" class="class_color">详细描述:</td>
  150. <td colspan="3"><textarea style="height:120px;width: 750px;" maxNum="450" name="REMARK_394" id="REMARK_394" class="validate[length[0,500]]"></textarea></td>
  151. </tr>
  152. <tr>
  153. <td align="right" width="120px" class="class_color"><span class="star">*</span>&nbsp;填报部门</td>
  154. <td><div class="selectTree validate[required]" selWidth="270" id="WRITE_DEPT_394" name="WRITE_DEPT_394" selWidth="200" boxHeight="260"></div></td>
  155. <td align="right" width="120px" class="class_color"><span class="star">*</span>&nbsp;填报人员</td>
  156. <td><input name="WRITER_394" id="WRITER_394" type="text" style="width: 265px;" maxlength="15" class="validate[required]" ></td>
  157. </tr>
  158. <tr>
  159. <td align="right" width="120px" class="class_color"><span class="star">*</span>&nbsp;填报时间</td>
  160. <td colspan="3"><input readonly="readonly" name="WRITE_TIME_394" id="WRITE_TIME_394" style="width: 265px;" type="text" class="date validate[required]" dateFmt="yyyy-MM-dd HH:mm" ></td>
  161. </tr>
  162. </table>
  163. </fieldset>
  164. </form>
  165. </div>
  166. </body>
  167. </html>