123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>预警总结报告填报</title>
- <%@include file="../../../../../include1.jsp" %>
- <script type="text/javascript" src="<%=path%>/scripts/business/em/alert/report/reportInput1/ReportInputAddEdit.js"></script>
- <style type="text/css">
- .bg_readonly{
- color:#cccccc !important;
- background:none repeat-x scroll left top #eeeeee!important;
- }
- </style>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- var _plan_id = "<%=request.getParameter("plan_id")%>";
- var pagetype = "<%=request.getParameter("pagetype")%>";
- var plan_time = "<%=request.getParameter("plan_time")%>";
- var input_role = "<%=request.getParameter("input_role")%>";
- if(input_role || input_role==""){
- input_role = "R002105430205";
- }
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- //父部门id
- var parentId = getCorpParentId(deptId);
- var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //页面初始化
- $(function(){
-
- $("#goback").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
- var alerttUrl = $.pathname() + '/ws/plan/ReportInputPlanService/getReportInputPlan/';
-
- $.ajax({
- url : alerttUrl,
- type : 'post',
- data : {unitId : deptId,is_alert : 0,report_type:2,roleId:input_role},},
- async:false,
- dataType : 'json',
- success : function(data) {
- $("#PLAN_ID_321").data("data",data);
- $("#PLAN_ID_321").render();
- },
- error : function(e) {
- $.messager.alert('访问服务失败!', 'error');
- }
- });
- //修改表单
- if(!(fd_id=="null"||fd_id=="")){
- $("#titleShow").text("修改预警总结报告");
- //预警类别
- $('#REPORT_TYPE_321').initCanstSelect('BM_AlertRespReportInputState');
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '321',
- objectID : fd_id
- };
- //$('#fileDiv').getUploadFileContent();
- //getFileList(fd_id);
- $.request.query(url,params,function(data){
- $('#editForm').ajaxWrite({data:data});
- $('#editForm input[name="IS_RELEASE_321"]').val('0');
- $('#editForm input[name="classid"]').val('321');
- $("#PLAN_ID_321").setValue(data.PLAN_ID_321);
-
- changeearlynum(data.PLAN_TIME_321);
-
- });
- //获得当前系统时间
- var now = getServerTime();
- $('#UPDATEDATE_321').val(now);
- }else{//新增
- $("#titleShow").text("添加预警总结报告");
- //预警类别
- $('#REPORT_TYPE_321').initCanstSelect('BM_AlertRespReportInputState');
- //加载附件上传样式
- //$('#fileDiv').getUploadFileContent();
- //获得当前系统时间
- var now = getServerTime();
- $('#INPUT_DATE_321').val(now);
- $('#UPDATEDATE_321').val(now);
- $("#INPUT_UNIT_321").val(deptId);
- $("#INPUT_NAME_321").val(realName);
- $("#INPUT_NAME_ID_321").val(userId);
- $("#PARENT_DEPT_ID_321").val(parentId);
- $("#INPUT_ROLE_ID_321").val(input_role);
- if(_plan_id!="null"){
- $("#PLAN_ID_321").setValue(_plan_id);
- changeearlynum();
- }
- }
- /* var opts = {
- //swf: 'baiduUpload/Uploader.swf',
- //server: 'Upload',
- fileNumLimit: 1,
- fileSizeLimit: 200 * 1024 * 1024, // 200 M
- fileSingleSizeLimit: 50 * 1024 * 1024, // 50 M
- pick: {
- id: '#filePicker',
- label: '点击选择文件',
- name : 'file'
- },
- dnd: '#dndArea',
- paste: '#uploader',
- chunked: false,
- chunkSize: 512 * 1024,
- disableGlobalDnd: true
- }; */
- $('#fileDiv').newAsyncFileUpload("",fd_id);//附件
- });
- function formreset(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ '/page/business/em/alert/report/reportInput1/ReportInputAddEdit.jsp?fd_id='+fd_id);
- }
- //获得当前系统时间
- function getDateTime(){
- var s="";
- var d = allGetServerTime();
- var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- var h = d.getHours();
- var m = d.getMinutes();
- var se = d.getSeconds();
- 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);
- return s;
- }
- function changeearlynum(planTime){
- var value = $("#PLAN_ID_321").attr("reltext");
- if(value&& value!="请选择"){
- $("#PLAN_NAME_321").val(value);
- if(value.indexOf("预警报告填报要求")>-1){
- value = value.split("预警报告填报要求")[0];
- }
- $("#REPORT_NAME_321").val(value+"预警总结报告"+"_"+deptName+"_"+getServerTime());
- $("#EARLY_ID_321").val(value);
- var node=$("#PLAN_ID_321").data("selectedNode");
- var time = node.time;
- var timeData = [];
- if(time){
- time = time.split(";");
- for (var i = 0; i < time.length; i++) {
- timeData.push({"key":time[i],"value":time[i]});
- }
- }
- $("#PLAN_TIME_321").data("data",timeData);
- $("#PLAN_TIME_321").render();
- if(planTime && planTime!="null"){
- $("#PLAN_TIME_321").setValue(planTime);
- }else{
- $("#PLAN_TIME_321").setValue(plan_time);
- }
- }
- }
-
- //获得当前系统时间
- function getDateTimeStr(){
- var s="";
- var d = allGetServerTime();
- //var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- var h = d.getHours();
- var m = d.getMinutes();
- //var se = d.getSeconds();
- s=(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+"_"+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
- return s;
- }
- function getCorpParentId(corpId){
- var parentId = corpId;
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/getParentCorpIdByCorpid/',
- type : 'post',
- timeout : 15000,
- data : {corpId:corpId},
- dataType : 'text',
- async:false,
- success : function(data) {
- parentId = data;
- },
- error : function(e) {
- $.messager.alert('访问服务失败!');
- }
- });
- return parentId;
- }
- </script>
- </head>
- <body class="bd" align="center" >
- <div id="formContent" class="d_ground">
- <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>
- <form method="post" id="editForm" enctype="multipart/form-data">
- <input name="classid" value="321" type="hidden"/>
- <input id="PROGRESS_ID_321" name="PROGRESS_ID_321" type="hidden"/>
- <input type="hidden" name="FD_OBJECTID321" value=""/>
- <input id="INPUT_UNIT_321" name="INPUT_UNIT_321" type="hidden"/>
- <input id="INPUT_NAME_321" name="INPUT_NAME_321" type="hidden"/>
- <input id="INPUT_NAME_ID_321" name="INPUT_NAME_ID_321" type="hidden"/>
- <!-- <input id="UPDATEDATE_321" name="UPDATEDATE_321" type="hidden"/> -->
- <input id="INPUT_DATE_321" name="INPUT_DATE_321" type="hidden"/>
- <input id="OPR_STATE_321" name="OPR_STATE_321" value="0" type="hidden"/>
- <input id="IS_RELEASE_321" name="IS_RELEASE_321" value="0" type="hidden"/>
- <input id="IS_ALERT_321" name="IS_ALERT_321" value="0" type="hidden"/>
- <input id="REPORT_TYPE_321" name="REPORT_TYPE_321" value="2" type="hidden"/>
- <input id="PLAN_NAME_321" name="PLAN_NAME_321" type="hidden"/>
- <input id="EARLY_ID_321" name="EARLY_ID_321" type="hidden"/>
- <input id="PARENT_DEPT_ID_321" name="PARENT_DEPT_ID_321" type="hidden"/>
- <input id="INPUT_ROLE_ID_321" name="INPUT_ROLE_ID_321" type="hidden"/>
- <!-- 保存和重置 -->
- <div class="button_jl">
- <input value="保存" type="button"
- id="save" /> <input value="保存并上报" type="button"
- id="saveandrelease" /> <input value="重置" input
- type="button" onclick="formreset()" />
- </div><br />
- <fieldset class="fieldset">
- <legend class="legend">基本信息:</legend>
- <table class="add_table_style" >
- <tr>
- <td width="150px" class="class_color"align="right"><span class="star">*</span>预警报告填报要求:</td>
- <td ><select name="PLAN_ID_321" class="validate[required] selectWidth " swidth="90.5%"
- id="PLAN_ID_321" prompt="请选择" onchange="changeearlynum()"></select></td>
- </tr>
- <tr>
- <td width="150px" class="class_color" align="right"><span class="star">*</span>报告名称:</td>
- <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>
- </tr>
- <tr>
- <td width="150px" align="right"><span class="star">*</span>要求填报时间:</td>
- <td ><select name="PLAN_TIME_321" class="validate[required] selectWidth " swidth="90.5%"
- id="PLAN_TIME_321" prompt="请选择" ></select></td>
- </tr>
- </table>
- </fieldset>
- <!-- <div id="maingrid"></div> -->
- <fieldset class="fieldset">
- <legend class="legend">附件信息:</legend>
- <table class="add_table_style file_table" >
- <tr>
- <td width="120px" align="right"><span align="right" class="star">*</span><span class="td-font">上传附件:</span></td>
- <td width="680px" colspan="3" ><div style="width:100%" id="fileDiv" name="fileDiv" ></div></td>
- </tr>
- </table>
- </fieldset>
- </form>
- </div>
- </body>
|