123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548 |
- <%@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" />
- <meta http-equiv="Content-Type" content="application/x-ms-application,image/jpeg,application/xaml+xml,image/gif,image/pjpeg,application/x-ms-xbap,*/*" />
- <title>应急工作专报填报</title>
- <%@include file="../../../../../include1.jsp" %>
- <script type="text/javascript" src="<%=path%>/scripts/business/em/response/report/reportInput/ReportInputAddEdit.js"></script>
- <style type="text/css">
- .download_a{
- width:400px;
- height:30px;
- line-height:30px;
- border: 1px;
- text-align: center;
- background: #346db2;
- position:relative;
- border-radius:5px;
- behavior: url(/nwyj/scripts/freamwork/com/sinosoft/system/right/PIE.htc);
-
-
- }
-
- .btnTab{
- margin: 0 auto;
- clear: both;
- }
-
-
- .downBtn{
- font-family: "宋体";
- font-size: 14px;
- color:#fff;
- width:400px;
- height:30px;
- line-height:30px;
- border: 1px;
- text-align: center;
- background: #346db2;
- border-radius:5px;
- behavior: url(/nwyj/scripts/freamwork/com/sinosoft/system/right/PIE.htc);
- cursor: pointer;
- position: relative;
- clear: both;
- }
-
-
- .fieldset,.add_table_style{
- clear: both;
- }
- label{
- font-size: 14px;
- cursor: pointer;
- margin-right: 10px;
- }
- .bg_readonly{
- color:#cccccc !important;
- background:none repeat-x scroll left top #eeeeee!important;
- }
- .this_table{
- width: 100%;
- margin: 10px 0;
- }
- .font_red {
- color: red;
- margin: 0 auto;
- text-align: center;
- }
- </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")%>";
- //取得用户真实名字
- 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();
- var roleId = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
- if(input_role && input_role!="" && input_role != "null"){
- roleId = input_role;
- }
- //页面初始化
- $(function(){
- $("#EVENT_ID").initYewuSelect("363","FD_OBJECTID","EVENT_NAME"," IS_DEL='0' order by updatedate desc"); //事件
- getReportRole()
- $("#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 : 1,report_type:3,roleId:roleId},
- 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_ReportInputState');
- 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();
- }else{//新增
- $("#titleShow").text("添加应急工作专报");
-
- //响应类别
- $('#REPORT_TYPE_321').initCanstSelect('BM_ReportInputState');
- //加载附件上传样式
- //$('#fileDiv').getUploadFileContent();
- //获得当前系统时间
- var now = getServerTime();
- $('#INPUT_DATE_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);
- if(_plan_id!="null"){
- $("#PLAN_ID_321").setValue(_plan_id);
- changeearlynum();
- getEventByPlanId(_plan_id);
- }
- }
-
- /* 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/response/report/reportInput/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();
- s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
- return s;
- }
- function changeearlynum(planTime){
- var value = $("#PLAN_ID_321").attr("reltext");
- if(value&& value!="请选择"){
- $("#PLAN_NAME_321").val(value);
- 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 warningNum = node.warningNum;
- var timeData = [];
- if(time){
- time = time.split(";");
- for (var i = 0; i < time.length; i++) {
- timeData.push({"key":time[i],"value":time[i]});
- }
- }
- var isUp = node.isUp;
- if(isUp==0){//上级
- $("#INPUT_ROLE_ID_321").val("R002105430205");//应急办
- }else{//本级
- $("#INPUT_ROLE_ID_321").val("R002105430222");//抢修中心
- }
-
-
- $("#PLAN_TIME_321").data("data",timeData);
- $("#PLAN_TIME_321").render();
- getEventByPlanId($("#PLAN_ID_321").attr("relvalue"));
- if(planTime && planTime!="null"){
- $("#PLAN_TIME_321").setValue(planTime);
- }else{
- $("#PLAN_TIME_321").setValue(plan_time);
- }
- createBaoBiaoDetail(warningNum,deptId,parentId);
- }
- }
-
-
- function openu(){
- var EVENT_ID = $("#EVENT_ID").attr("relvalue");
- if(!EVENT_ID || EVENT_ID==""){
- top.Dialog.alert("需要选择事件才能自动生成专报!");
- return;
- }
- var role_Id = getCheckedRole();
- var url = "/nwyj/ws/xianlutingyun/XianlutingyunService/getWord?role_Id="+role_Id+"&dept_id="+deptId+"&EVENT_ID="+EVENT_ID;
- $.ajax({
- url :url,
- type : 'post',
- async:false,
- dataType : 'text',
- success : function(data) {
- /* data = data.substring(data.lastIndexOf("upload\\")); */
- data = data.replace(/\\/,"/");
- window.open(data);
- },
- error : function(e) {
- $.messager.alert('访问服务失败!', 'error');
- }
- });
- }
-
-
-
- function getCheckedRole(){
- var msg = "";
- $("input:checkbox[name=aa]").each(function(){
- if($(this).attr("checked")){
- msg += "," + $(this).val();
- }
- })
- if(msg == ""){
- msg = "无"
- }else{
- msg = msg.substring(1);
- }
- return msg;
- }
-
-
- /**
- 跳转到报表填报进度监控页面
- */
- function viewBaoBiao(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/report/monitor/reportScheduleControl.html?reportInput&"+fd_id);
- }
-
- //获得当前系统时间
- 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;
- }
- /*********通过任务id获取对应通知单绑定的事件id************/
- function getEventByPlanId(planId){
- $.ajax({
- url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/getEventByPlanId',
- type : 'post',
- data:{"planId":planId},
- dataType : 'text',
- async:false,
- success : function(data) {
- $("#EVENT_ID").setValue(data);
- },
- error : function(e) {
- $("#EVENT_ID").setValue("");
- }
- });
- }
-
-
- /**
- 加载选择角色选项
- **/
- function getReportRole(){
- $.ajax({
- url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/loadJBRole',
- type : 'post',
- timeout : 15000,
- dataType : 'json',
- data:{"corpId":deptId},
- success : function(data) {
- if(data.length>0){
- var dom = "<table class='this_table'><tr><td align='center' class='class_color' width='25%'><div class='font_bold' style='font-size:14px;'> 选择部门: </div></td><td align='left' class='class_color'>";
- for (var i = 0; i < data.length; i++) {
- var rol_name = data[i].ROLE_NAME;
- var roleid = data[i].ROLE_ID;
- dom += "<input type='checkbox' name='aa' value='"+roleid+"' id='role_"+roleid+"'/><label for='role_"+roleid+"'>"+rol_name+"</label>";
- if((i+1)%3==0){
- dom += "<br/>";
- }
- }
- dom += "</td></tr><tr><td></td><td><input type='checkbox' name='all' id='checkAll'/><label for='checkAll'>全选</label></td></tr></table>";
- $("#event_con").after(dom);
- $("#checkAll").bind("click",function(){
- if($(this).attr("checked")){
- $("input[name=aa]").attr("checked",true);
- }else{
- $("input[name=aa]").attr("checked",false);
- }
- })
- $("input[name=aa]").attr("checked",true);
- $("#checkAll").attr("checked",true);
- }
- setHight();
- },
- error : function(e) {
- $.messager.alert('访问服务失败!');
- }
- });
- }
- /****
- 通过通知单编号和单位id查询各部门报表填报情况
- ***/
- function createBaoBiaoDetail(earlyWarningId,comp_id,parentId){
- $.ajax({
- url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/loadBaoBiaoDetail',
- type : 'post',
- data:{"earlyWarningId":earlyWarningId, "comp_id":comp_id,"parent_id":parentId},
- timeout : 15000,
- dataType : 'json',
- async:false,
- success : function(data) {
- //alert(JSON.stringify(data));
- var baobiaoStr = "";
- $("#baobiao").empty();
- if(data!=null && data!=undefined && data!="" && data.rows.length>0 ){
- data = data.rows;
- for (var i = 0; i < data.length; i++) {
- var length1 = data[i].children.length * data[i].children[0].children.length;
- var baobiaoStr1 = "";
- var children1 = data[i].children;
- baobiaoStr1 = "<td width='20%' rowspan='"+length1+"'>"+data[i].deptName+"</td>";
- for (var j = 0; j < children1.length; j++) {
- var children2 = children1[j].children;
- var length2 = children2.length;
- var baobiaoStr2 = "";
- for (var k = 0; k < children2.length; k++) {
- if(k%length2==0){
- baobiaoStr2 = "<td width='30%' rowspan='"+length2+"'>"+children1[j].RESPONSIBLE_NAME_322+"</td>";
- }else{
- baobiaoStr2 = "";
- }
- var WRITE_TIME_322 = children2[k].WRITE_TIME_322==undefined?"无":children2[k].WRITE_TIME_322;
- var WRITER_322 = children2[k].WRITER_322==undefined?"无":children2[k].WRITER_322;
- baobiaoStr += "<tr align='center' >"+baobiaoStr1+baobiaoStr2+
- "<td width='20%'>"+children2[k].PROGRAMME_TIME_322+"</td>"+
- "<td width='20%'>"+WRITE_TIME_322+"</td>"+
- "<td width='10%'>"+WRITER_322+"</td>"+
- "</tr>"
- baobiaoStr1 = "";
- }
- }
-
- }
- //alert(baobiaoStr)
- $("#baobiao").append(baobiaoStr);
- $(top.document.body).find("#frmright").height($(window.document.body).height);
- }else{
- $("#baobiao").append("<tr align='center' ><td colspan='5'>暂未发布相关报表</td></tr>");
- }
- setHight();
- },
- error : function(e) {
- $.messager.alert('访问服务失败!');
- }
- });
- }
- </script>
- </head>
- <body class="bd" align="center" >
- <div style="clear: both;"></div>
- <div id="formContent" class="d_ground">
- <div class="title" align="center"><a href="javascript:;"><img id='goback' class="back" align="left" alt="返回" title="返回" 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="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="1" type="hidden" />
- <input id="REPORT_TYPE_321" name="REPORT_TYPE_321" value="3" 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" align="right" class="class_color"><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" align="right" class="class_color"><span class="star">*</span>报告名称:</td>
- <td ><input readonly="readonly"
- name="REPORT_NAME_321" id="REPORT_NAME_321" type="text" value=""
- class="validate[required,length[0,100]] bg_readonly" 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 style="clear: both;"></div>
- <fieldset class="fieldset">
- <legend class="legend">各部门报表填报情况:</legend>
- <table class="tableStyle">
- <thead>
- <tr align="center" >
- <td width='20%'>部门</td>
- <td width='30%'>报表名称</td>
- <td width='20%'>计划时间</td>
- <td width='20%'>填报时间</td>
- <td width='10%'>填报人</td>
- </tr>
-
- </thead>
- <tbody id="baobiao">
-
- </tbody>
- </table>
- </fieldset>
- <fieldset class="fieldset">
- <div id="table_cont">
- <table id="event_con" class='this_table'>
- <tr>
- <td align='center' class='class_color' width='25%'><div class='font_bold' style='font-size:14px;'>选择事件:</div></td>
- <td align='center' class='class_color' width='75%'>
- <select editable=false id="EVENT_ID" selAlign="" selWidth="600"></select>
- </td>
- </tr>
- </table>
- <table class="btnTab this_table">
- <tr>
- <!-- <td align="center" class="class_color">
- <div>
- <input type="button" id="viewBaoBiaoBtn" value="查看报表填报情况" onclick="viewBaoBiao()" class="downBtn"/>
- </div>
- </td> -->
- <td align="center" class="class_color">
- <div>
- <input type="button" id="downLoad" value="点击自动生成工作专报" onclick="openu()" class="downBtn"/>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="font_red">
- 自动生成工作专报说明:需要关联相应的事件,根据选择的部门筛选出要查看的部门简报信息。
- </div>
- </fieldset>
-
- <div id="maingrid"></div>
- <div style="clear: both;"></div>
- <fieldset class="fieldset">
- <legend class="legend">附件信息:</legend>
- <!-- <div id="downloadMB"> <a href="javascript:openu()" class="red underline">点击这里</a>下载导入的excel数据模板</div> -->
- <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>
|