3b921f0572b512593cf9dd415a38f66c438c05f8.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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="../../../../../include1.jsp" %>
  8. <script type="text/javascript" src="<%=path%>/scripts/business/em/alert/report/reportInput1/ReportInputAddEdit.js"></script>
  9. <style type="text/css">
  10. .bg_readonly{
  11. color:#cccccc !important;
  12. background:none repeat-x scroll left top #eeeeee!important;
  13. }
  14. </style>
  15. <script type="text/javascript">
  16. var fd_id = "<%=request.getParameter("fd_id")%>";
  17. var _plan_id = "<%=request.getParameter("plan_id")%>";
  18. var pagetype = "<%=request.getParameter("pagetype")%>";
  19. var plan_time = "<%=request.getParameter("plan_time")%>";
  20. var input_role = "<%=request.getParameter("input_role")%>";
  21. if(input_role || input_role==""){
  22. input_role = "R002105430205";
  23. }
  24. //取得用户真实名字
  25. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  26. //部门id
  27. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  28. //部门名称
  29. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  30. //父部门id
  31. var parentId = getCorpParentId(deptId);
  32. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  33. //页面初始化
  34. $(function(){
  35. $("#goback").hover(function(){
  36. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  37. },function(){
  38. $(this).attr("src","/nwyj/images/temp/back.png");
  39. });
  40. var alerttUrl = $.pathname() + '/ws/plan/ReportInputPlanService/getReportInputPlan/';
  41. $.ajax({
  42. url : alerttUrl,
  43. type : 'post',
  44. data : {unitId : deptId,is_alert : 0,report_type:2,roleId:input_role},},
  45. async:false,
  46. dataType : 'json',
  47. success : function(data) {
  48. $("#PLAN_ID_321").data("data",data);
  49. $("#PLAN_ID_321").render();
  50. },
  51. error : function(e) {
  52. $.messager.alert('访问服务失败!', 'error');
  53. }
  54. });
  55. //修改表单
  56. if(!(fd_id=="null"||fd_id=="")){
  57. $("#titleShow").text("修改预警总结报告");
  58. //预警类别
  59. $('#REPORT_TYPE_321').initCanstSelect('BM_AlertRespReportInputState');
  60. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  61. var params = {
  62. classid : '321',
  63. objectID : fd_id
  64. };
  65. //$('#fileDiv').getUploadFileContent();
  66. //getFileList(fd_id);
  67. $.request.query(url,params,function(data){
  68. $('#editForm').ajaxWrite({data:data});
  69. $('#editForm input[name="IS_RELEASE_321"]').val('0');
  70. $('#editForm input[name="classid"]').val('321');
  71. $("#PLAN_ID_321").setValue(data.PLAN_ID_321);
  72. changeearlynum(data.PLAN_TIME_321);
  73. });
  74. //获得当前系统时间
  75. var now = getServerTime();
  76. $('#UPDATEDATE_321').val(now);
  77. }else{//新增
  78. $("#titleShow").text("添加预警总结报告");
  79. //预警类别
  80. $('#REPORT_TYPE_321').initCanstSelect('BM_AlertRespReportInputState');
  81. //加载附件上传样式
  82. //$('#fileDiv').getUploadFileContent();
  83. //获得当前系统时间
  84. var now = getServerTime();
  85. $('#INPUT_DATE_321').val(now);
  86. $('#UPDATEDATE_321').val(now);
  87. $("#INPUT_UNIT_321").val(deptId);
  88. $("#INPUT_NAME_321").val(realName);
  89. $("#INPUT_NAME_ID_321").val(userId);
  90. $("#PARENT_DEPT_ID_321").val(parentId);
  91. $("#INPUT_ROLE_ID_321").val(input_role);
  92. if(_plan_id!="null"){
  93. $("#PLAN_ID_321").setValue(_plan_id);
  94. changeearlynum();
  95. }
  96. }
  97. /* var opts = {
  98. //swf: 'baiduUpload/Uploader.swf',
  99. //server: 'Upload',
  100. fileNumLimit: 1,
  101. fileSizeLimit: 200 * 1024 * 1024, // 200 M
  102. fileSingleSizeLimit: 50 * 1024 * 1024, // 50 M
  103. pick: {
  104. id: '#filePicker',
  105. label: '点击选择文件',
  106. name : 'file'
  107. },
  108. dnd: '#dndArea',
  109. paste: '#uploader',
  110. chunked: false,
  111. chunkSize: 512 * 1024,
  112. disableGlobalDnd: true
  113. }; */
  114. $('#fileDiv').newAsyncFileUpload("",fd_id);//附件
  115. });
  116. function formreset(){
  117. $('#frmright', window.parent.document).attr('src',$.pathname()+ '/page/business/em/alert/report/reportInput1/ReportInputAddEdit.jsp?fd_id='+fd_id);
  118. }
  119. //获得当前系统时间
  120. function getDateTime(){
  121. var s="";
  122. var d = allGetServerTime();
  123. var vYear = d.getFullYear();
  124. var vMon = d.getMonth() + 1;
  125. var vDay = d.getDate();
  126. var h = d.getHours();
  127. var m = d.getMinutes();
  128. var se = d.getSeconds();
  129. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
  130. return s;
  131. }
  132. function changeearlynum(planTime){
  133. var value = $("#PLAN_ID_321").attr("reltext");
  134. if(value&& value!="请选择"){
  135. $("#PLAN_NAME_321").val(value);
  136. if(value.indexOf("预警报告填报要求")>-1){
  137. value = value.split("预警报告填报要求")[0];
  138. }
  139. $("#REPORT_NAME_321").val(value+"预警总结报告"+"_"+deptName+"_"+getServerTime());
  140. $("#EARLY_ID_321").val(value);
  141. var node=$("#PLAN_ID_321").data("selectedNode");
  142. var time = node.time;
  143. var timeData = [];
  144. if(time){
  145. time = time.split(";");
  146. for (var i = 0; i < time.length; i++) {
  147. timeData.push({"key":time[i],"value":time[i]});
  148. }
  149. }
  150. $("#PLAN_TIME_321").data("data",timeData);
  151. $("#PLAN_TIME_321").render();
  152. if(planTime && planTime!="null"){
  153. $("#PLAN_TIME_321").setValue(planTime);
  154. }else{
  155. $("#PLAN_TIME_321").setValue(plan_time);
  156. }
  157. }
  158. }
  159. //获得当前系统时间
  160. function getDateTimeStr(){
  161. var s="";
  162. var d = allGetServerTime();
  163. //var vYear = d.getFullYear();
  164. var vMon = d.getMonth() + 1;
  165. var vDay = d.getDate();
  166. var h = d.getHours();
  167. var m = d.getMinutes();
  168. //var se = d.getSeconds();
  169. s=(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+"_"+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
  170. return s;
  171. }
  172. function getCorpParentId(corpId){
  173. var parentId = corpId;
  174. $.ajax({
  175. url : $.pathname() + '/ws/crud/CRUDService/getParentCorpIdByCorpid/',
  176. type : 'post',
  177. timeout : 15000,
  178. data : {corpId:corpId},
  179. dataType : 'text',
  180. async:false,
  181. success : function(data) {
  182. parentId = data;
  183. },
  184. error : function(e) {
  185. $.messager.alert('访问服务失败!');
  186. }
  187. });
  188. return parentId;
  189. }
  190. </script>
  191. </head>
  192. <body class="bd" align="center" >
  193. <div id="formContent" class="d_ground">
  194. <div class="title" align="center"><a href="javascript:;"><img id='goback' class="back" align="left" title="返回" alt="返回" src="/nwyj/images/temp/back.png" ></img></a><font class="title_font" id="titleShow"></font></div>
  195. <form method="post" id="editForm" enctype="multipart/form-data">
  196. <input name="classid" value="321" type="hidden"/>
  197. <input id="PROGRESS_ID_321" name="PROGRESS_ID_321" type="hidden"/>
  198. <input type="hidden" name="FD_OBJECTID321" value=""/>
  199. <input id="INPUT_UNIT_321" name="INPUT_UNIT_321" type="hidden"/>
  200. <input id="INPUT_NAME_321" name="INPUT_NAME_321" type="hidden"/>
  201. <input id="INPUT_NAME_ID_321" name="INPUT_NAME_ID_321" type="hidden"/>
  202. <!-- <input id="UPDATEDATE_321" name="UPDATEDATE_321" type="hidden"/> -->
  203. <input id="INPUT_DATE_321" name="INPUT_DATE_321" type="hidden"/>
  204. <input id="OPR_STATE_321" name="OPR_STATE_321" value="0" type="hidden"/>
  205. <input id="IS_RELEASE_321" name="IS_RELEASE_321" value="0" type="hidden"/>
  206. <input id="IS_ALERT_321" name="IS_ALERT_321" value="0" type="hidden"/>
  207. <input id="REPORT_TYPE_321" name="REPORT_TYPE_321" value="2" type="hidden"/>
  208. <input id="PLAN_NAME_321" name="PLAN_NAME_321" type="hidden"/>
  209. <input id="EARLY_ID_321" name="EARLY_ID_321" type="hidden"/>
  210. <input id="PARENT_DEPT_ID_321" name="PARENT_DEPT_ID_321" type="hidden"/>
  211. <input id="INPUT_ROLE_ID_321" name="INPUT_ROLE_ID_321" type="hidden"/>
  212. <!-- 保存和重置 -->
  213. <div class="button_jl">
  214. <input value="保存" type="button"
  215. id="save" />&nbsp;&nbsp;<input value="保存并上报" type="button"
  216. id="saveandrelease" />&nbsp;&nbsp;<input value="重置" input
  217. type="button" onclick="formreset()" />
  218. </div><br />
  219. <fieldset class="fieldset">
  220. <legend class="legend">基本信息:</legend>
  221. <table class="add_table_style" >
  222. <tr>
  223. <td width="150px" class="class_color"align="right"><span class="star">*</span>预警报告填报要求:</td>
  224. <td ><select name="PLAN_ID_321" class="validate[required] selectWidth " swidth="90.5%"
  225. id="PLAN_ID_321" prompt="请选择" onchange="changeearlynum()"></select></td>
  226. </tr>
  227. <tr>
  228. <td width="150px" class="class_color" align="right"><span class="star">*</span>报告名称:</td>
  229. <td ><input readonly="readonly" name="REPORT_NAME_321" id="REPORT_NAME_321" type="text" value="" class="bg_readonly validate[required,length[0,100]]" maxlength="" style="width:90%"></td>
  230. </tr>
  231. <tr>
  232. <td width="150px" align="right"><span class="star">*</span>要求填报时间:</td>
  233. <td ><select name="PLAN_TIME_321" class="validate[required] selectWidth " swidth="90.5%"
  234. id="PLAN_TIME_321" prompt="请选择" ></select></td>
  235. </tr>
  236. </table>
  237. </fieldset>
  238. <!-- <div id="maingrid"></div> -->
  239. <fieldset class="fieldset">
  240. <legend class="legend">附件信息:</legend>
  241. <table class="add_table_style file_table" >
  242. <tr>
  243. <td width="120px" align="right"><span align="right" class="star">*</span><span class="td-font">上传附件:</span></td>
  244. <td width="680px" colspan="3" ><div style="width:100%" id="fileDiv" name="fileDiv" ></div></td>
  245. </tr>
  246. </table>
  247. </fieldset>
  248. </form>
  249. </div>
  250. </body>