80bbc10cbf0ffeb326fad6aa7ff77b1155eacf8a.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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. <meta http-equiv="Content-Type" content="application/x-ms-application,image/jpeg,application/xaml+xml,image/gif,image/pjpeg,application/x-ms-xbap,*/*" />
  7. <title>应急工作专报填报</title>
  8. <%@include file="../../../../../include1.jsp" %>
  9. <script type="text/javascript" src="<%=path%>/scripts/business/em/response/report/reportInput/ReportInputAddEdit.js"></script>
  10. <style type="text/css">
  11. .download_a{
  12. width:400px;
  13. height:30px;
  14. line-height:30px;
  15. border: 1px;
  16. text-align: center;
  17. background: #346db2;
  18. position:relative;
  19. border-radius:5px;
  20. behavior: url(/nwyj/scripts/freamwork/com/sinosoft/system/right/PIE.htc);
  21. }
  22. .btnTab{
  23. margin: 0 auto;
  24. clear: both;
  25. }
  26. .downBtn{
  27. font-family: "宋体";
  28. font-size: 14px;
  29. color:#fff;
  30. width:400px;
  31. height:30px;
  32. line-height:30px;
  33. border: 1px;
  34. text-align: center;
  35. background: #346db2;
  36. border-radius:5px;
  37. behavior: url(/nwyj/scripts/freamwork/com/sinosoft/system/right/PIE.htc);
  38. cursor: pointer;
  39. position: relative;
  40. clear: both;
  41. }
  42. .fieldset,.add_table_style{
  43. clear: both;
  44. }
  45. label{
  46. font-size: 14px;
  47. cursor: pointer;
  48. margin-right: 10px;
  49. }
  50. .bg_readonly{
  51. color:#cccccc !important;
  52. background:none repeat-x scroll left top #eeeeee!important;
  53. }
  54. .this_table{
  55. width: 100%;
  56. margin: 10px 0;
  57. }
  58. .font_red {
  59. color: red;
  60. margin: 0 auto;
  61. text-align: center;
  62. }
  63. </style>
  64. <script type="text/javascript">
  65. var fd_id = "<%=request.getParameter("fd_id")%>";
  66. var _plan_id = "<%=request.getParameter("plan_id")%>";
  67. var pagetype = "<%=request.getParameter("pagetype")%>";
  68. var plan_time = "<%=request.getParameter("plan_time")%>";
  69. var input_role = "<%=request.getParameter("input_role")%>";
  70. //取得用户真实名字
  71. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  72. //部门id
  73. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  74. //部门名称
  75. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  76. //父部门id
  77. var parentId = getCorpParentId(deptId);
  78. var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  79. var roleId = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
  80. if(input_role && input_role!="" && input_role != "null"){
  81. roleId = input_role;
  82. }
  83. //页面初始化
  84. $(function(){
  85. $("#EVENT_ID").initYewuSelect("363","FD_OBJECTID","EVENT_NAME"," IS_DEL='0' order by updatedate desc"); //事件
  86. getReportRole()
  87. $("#goback").hover(function(){
  88. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  89. },function(){
  90. $(this).attr("src","/nwyj/images/temp/back.png");
  91. });
  92. var alerttUrl = $.pathname() + '/ws/plan/ReportInputPlanService/getReportInputPlan/';
  93. $.ajax({
  94. url : alerttUrl,
  95. type : 'post',
  96. data : {unitId : deptId,is_alert : 1,report_type:3,roleId:roleId},
  97. async:false,
  98. dataType : 'json',
  99. success : function(data) {
  100. $("#PLAN_ID_321").data("data",data);
  101. $("#PLAN_ID_321").render();
  102. },
  103. error : function(e) {
  104. $.messager.alert('访问服务失败!', 'error');
  105. }
  106. });
  107. //修改表单
  108. if(!(fd_id=="null"||fd_id=="")){
  109. $("#titleShow").text("修改应急工作专报");
  110. //响应类别
  111. $('#REPORT_TYPE_321').initCanstSelect('BM_ReportInputState');
  112. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  113. var params = {
  114. classid : '321',
  115. objectID : fd_id
  116. };
  117. //$('#fileDiv').getUploadFileContent();
  118. //getFileList(fd_id);
  119. $.request.query(url,params,function(data){
  120. $('#editForm').ajaxWrite({data:data});
  121. $('#editForm input[name="IS_RELEASE_321"]').val('0');
  122. $('#editForm input[name="classid"]').val('321');
  123. $("#PLAN_ID_321").setValue(data.PLAN_ID_321);
  124. changeearlynum(data.PLAN_TIME_321);
  125. });
  126. //获得当前系统时间
  127. var now = getServerTime();
  128. }else{//新增
  129. $("#titleShow").text("添加应急工作专报");
  130. //响应类别
  131. $('#REPORT_TYPE_321').initCanstSelect('BM_ReportInputState');
  132. //加载附件上传样式
  133. //$('#fileDiv').getUploadFileContent();
  134. //获得当前系统时间
  135. var now = getServerTime();
  136. $('#INPUT_DATE_321').val(now);
  137. $("#INPUT_UNIT_321").val(deptId);
  138. $("#INPUT_NAME_321").val(realName);
  139. $("#INPUT_NAME_ID_321").val(userId);
  140. $("#PARENT_DEPT_ID_321").val(parentId);
  141. if(_plan_id!="null"){
  142. $("#PLAN_ID_321").setValue(_plan_id);
  143. changeearlynum();
  144. getEventByPlanId(_plan_id);
  145. }
  146. }
  147. /* var opts = {
  148. //swf: 'baiduUpload/Uploader.swf',
  149. //server: 'Upload',
  150. fileNumLimit: 1,
  151. fileSizeLimit: 200 * 1024 * 1024, // 200 M
  152. fileSingleSizeLimit: 50 * 1024 * 1024, // 50 M
  153. pick: {
  154. id: '#filePicker',
  155. label: '点击选择文件',
  156. name : 'file'
  157. },
  158. dnd: '#dndArea',
  159. paste: '#uploader',
  160. chunked: false,
  161. chunkSize: 512 * 1024,
  162. disableGlobalDnd: true
  163. }; */
  164. $('#fileDiv').newAsyncFileUpload("",fd_id);//附件
  165. });
  166. function formreset(){
  167. $('#frmright', window.parent.document).attr('src',$.pathname()+ '/page/business/em/response/report/reportInput/ReportInputAddEdit.jsp?fd_id='+fd_id);
  168. }
  169. //获得当前系统时间
  170. function getDateTime(){
  171. var s="";
  172. var d = allGetServerTime();
  173. var vYear = d.getFullYear();
  174. var vMon = d.getMonth() + 1;
  175. var vDay = d.getDate();
  176. var h = d.getHours();
  177. var m = d.getMinutes();
  178. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
  179. return s;
  180. }
  181. function changeearlynum(planTime){
  182. var value = $("#PLAN_ID_321").attr("reltext");
  183. if(value&& value!="请选择"){
  184. $("#PLAN_NAME_321").val(value);
  185. value = value.split("专报填报要求")[0];
  186. $("#REPORT_NAME_321").val(value+"应急工作专报"+"_"+deptName+"_"+getServerTime());
  187. $("#EARLY_ID_321").val(value);
  188. var node=$("#PLAN_ID_321").data("selectedNode");
  189. var time = node.time;
  190. var warningNum = node.warningNum;
  191. var timeData = [];
  192. if(time){
  193. time = time.split(";");
  194. for (var i = 0; i < time.length; i++) {
  195. timeData.push({"key":time[i],"value":time[i]});
  196. }
  197. }
  198. var isUp = node.isUp;
  199. if(isUp==0){//上级
  200. $("#INPUT_ROLE_ID_321").val("R002105430205");//应急办
  201. }else{//本级
  202. $("#INPUT_ROLE_ID_321").val("R002105430222");//抢修中心
  203. }
  204. $("#PLAN_TIME_321").data("data",timeData);
  205. $("#PLAN_TIME_321").render();
  206. getEventByPlanId($("#PLAN_ID_321").attr("relvalue"));
  207. if(planTime && planTime!="null"){
  208. $("#PLAN_TIME_321").setValue(planTime);
  209. }else{
  210. $("#PLAN_TIME_321").setValue(plan_time);
  211. }
  212. createBaoBiaoDetail(warningNum,deptId,parentId);
  213. }
  214. }
  215. function openu(){
  216. var EVENT_ID = $("#EVENT_ID").attr("relvalue");
  217. if(!EVENT_ID || EVENT_ID==""){
  218. top.Dialog.alert("需要选择事件才能自动生成专报!");
  219. return;
  220. }
  221. var role_Id = getCheckedRole();
  222. var url = "/nwyj/ws/xianlutingyun/XianlutingyunService/getWord?role_Id="+role_Id+"&dept_id="+deptId+"&EVENT_ID="+EVENT_ID;
  223. $.ajax({
  224. url :url,
  225. type : 'post',
  226. async:false,
  227. dataType : 'text',
  228. success : function(data) {
  229. /* data = data.substring(data.lastIndexOf("upload\\")); */
  230. data = data.replace(/\\/,"/");
  231. window.open(data);
  232. },
  233. error : function(e) {
  234. $.messager.alert('访问服务失败!', 'error');
  235. }
  236. });
  237. }
  238. function getCheckedRole(){
  239. var msg = "";
  240. $("input:checkbox[name=aa]").each(function(){
  241. if($(this).attr("checked")){
  242. msg += "," + $(this).val();
  243. }
  244. })
  245. if(msg == ""){
  246. msg = "无"
  247. }else{
  248. msg = msg.substring(1);
  249. }
  250. return msg;
  251. }
  252. /**
  253. 跳转到报表填报进度监控页面
  254. */
  255. function viewBaoBiao(){
  256. $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/report/monitor/reportScheduleControl.html?reportInput&"+fd_id);
  257. }
  258. //获得当前系统时间
  259. function getDateTimeStr(){
  260. var s="";
  261. var d = allGetServerTime();
  262. //var vYear = d.getFullYear();
  263. var vMon = d.getMonth() + 1;
  264. var vDay = d.getDate();
  265. var h = d.getHours();
  266. var m = d.getMinutes();
  267. //var se = d.getSeconds();
  268. s=(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+"_"+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
  269. return s;
  270. }
  271. function getCorpParentId(corpId){
  272. var parentId = corpId;
  273. $.ajax({
  274. url : $.pathname() + '/ws/crud/CRUDService/getParentCorpIdByCorpid/',
  275. type : 'post',
  276. timeout : 15000,
  277. data : {corpId:corpId},
  278. dataType : 'text',
  279. async:false,
  280. success : function(data) {
  281. parentId = data;
  282. },
  283. error : function(e) {
  284. $.messager.alert('访问服务失败!');
  285. }
  286. });
  287. return parentId;
  288. }
  289. /*********通过任务id获取对应通知单绑定的事件id************/
  290. function getEventByPlanId(planId){
  291. $.ajax({
  292. url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/getEventByPlanId',
  293. type : 'post',
  294. data:{"planId":planId},
  295. dataType : 'text',
  296. async:false,
  297. success : function(data) {
  298. $("#EVENT_ID").setValue(data);
  299. },
  300. error : function(e) {
  301. $("#EVENT_ID").setValue("");
  302. }
  303. });
  304. }
  305. /**
  306. 加载选择角色选项
  307. **/
  308. function getReportRole(){
  309. $.ajax({
  310. url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/loadJBRole',
  311. type : 'post',
  312. timeout : 15000,
  313. dataType : 'json',
  314. data:{"corpId":deptId},
  315. success : function(data) {
  316. if(data.length>0){
  317. 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'>";
  318. for (var i = 0; i < data.length; i++) {
  319. var rol_name = data[i].ROLE_NAME;
  320. var roleid = data[i].ROLE_ID;
  321. dom += "<input type='checkbox' name='aa' value='"+roleid+"' id='role_"+roleid+"'/><label for='role_"+roleid+"'>"+rol_name+"</label>";
  322. if((i+1)%3==0){
  323. dom += "<br/>";
  324. }
  325. }
  326. dom += "</td></tr><tr><td></td><td><input type='checkbox' name='all' id='checkAll'/><label for='checkAll'>全选</label></td></tr></table>";
  327. $("#event_con").after(dom);
  328. $("#checkAll").bind("click",function(){
  329. if($(this).attr("checked")){
  330. $("input[name=aa]").attr("checked",true);
  331. }else{
  332. $("input[name=aa]").attr("checked",false);
  333. }
  334. })
  335. $("input[name=aa]").attr("checked",true);
  336. $("#checkAll").attr("checked",true);
  337. }
  338. setHight();
  339. },
  340. error : function(e) {
  341. $.messager.alert('访问服务失败!');
  342. }
  343. });
  344. }
  345. /****
  346. 通过通知单编号和单位id查询各部门报表填报情况
  347. ***/
  348. function createBaoBiaoDetail(earlyWarningId,comp_id,parentId){
  349. $.ajax({
  350. url : $.pathname() + '/ws/qrps/QueryReportProgrammeService/loadBaoBiaoDetail',
  351. type : 'post',
  352. data:{"earlyWarningId":earlyWarningId, "comp_id":comp_id,"parent_id":parentId},
  353. timeout : 15000,
  354. dataType : 'json',
  355. async:false,
  356. success : function(data) {
  357. //alert(JSON.stringify(data));
  358. var baobiaoStr = "";
  359. $("#baobiao").empty();
  360. if(data!=null && data!=undefined && data!="" && data.rows.length>0 ){
  361. data = data.rows;
  362. for (var i = 0; i < data.length; i++) {
  363. var length1 = data[i].children.length * data[i].children[0].children.length;
  364. var baobiaoStr1 = "";
  365. var children1 = data[i].children;
  366. baobiaoStr1 = "<td width='20%' rowspan='"+length1+"'>"+data[i].deptName+"</td>";
  367. for (var j = 0; j < children1.length; j++) {
  368. var children2 = children1[j].children;
  369. var length2 = children2.length;
  370. var baobiaoStr2 = "";
  371. for (var k = 0; k < children2.length; k++) {
  372. if(k%length2==0){
  373. baobiaoStr2 = "<td width='30%' rowspan='"+length2+"'>"+children1[j].RESPONSIBLE_NAME_322+"</td>";
  374. }else{
  375. baobiaoStr2 = "";
  376. }
  377. var WRITE_TIME_322 = children2[k].WRITE_TIME_322==undefined?"无":children2[k].WRITE_TIME_322;
  378. var WRITER_322 = children2[k].WRITER_322==undefined?"无":children2[k].WRITER_322;
  379. baobiaoStr += "<tr align='center' >"+baobiaoStr1+baobiaoStr2+
  380. "<td width='20%'>"+children2[k].PROGRAMME_TIME_322+"</td>"+
  381. "<td width='20%'>"+WRITE_TIME_322+"</td>"+
  382. "<td width='10%'>"+WRITER_322+"</td>"+
  383. "</tr>"
  384. baobiaoStr1 = "";
  385. }
  386. }
  387. }
  388. //alert(baobiaoStr)
  389. $("#baobiao").append(baobiaoStr);
  390. $(top.document.body).find("#frmright").height($(window.document.body).height);
  391. }else{
  392. $("#baobiao").append("<tr align='center' ><td colspan='5'>暂未发布相关报表</td></tr>");
  393. }
  394. setHight();
  395. },
  396. error : function(e) {
  397. $.messager.alert('访问服务失败!');
  398. }
  399. });
  400. }
  401. </script>
  402. </head>
  403. <body class="bd" align="center" >
  404. <div style="clear: both;"></div>
  405. <div id="formContent" class="d_ground">
  406. <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>
  407. <form method="post" id="editForm" enctype="multipart/form-data">
  408. <input name="classid" value="321" type="hidden" />
  409. <input id="PROGRESS_ID_321" name="PROGRESS_ID_321" type="hidden" />
  410. <input type="hidden" name="FD_OBJECTID321" value="" />
  411. <input id="INPUT_UNIT_321" name="INPUT_UNIT_321" type="hidden" />
  412. <input id="INPUT_NAME_321" name="INPUT_NAME_321" type="hidden" />
  413. <input id="INPUT_NAME_ID_321" name="INPUT_NAME_ID_321" type="hidden" />
  414. <input id="INPUT_DATE_321" name="INPUT_DATE_321" type="hidden" />
  415. <input id="OPR_STATE_321" name="OPR_STATE_321" value="0" type="hidden" />
  416. <input id="IS_RELEASE_321" name="IS_RELEASE_321" value="0" type="hidden" />
  417. <input id="IS_ALERT_321" name="IS_ALERT_321" value="1" type="hidden" />
  418. <input id="REPORT_TYPE_321" name="REPORT_TYPE_321" value="3" type="hidden" />
  419. <input id="PLAN_NAME_321" name="PLAN_NAME_321" type="hidden" />
  420. <input id="EARLY_ID_321" name="EARLY_ID_321" type="hidden" />
  421. <input id="PARENT_DEPT_ID_321" name="PARENT_DEPT_ID_321" type="hidden" />
  422. <input id="INPUT_ROLE_ID_321" name="INPUT_ROLE_ID_321" type="hidden" />
  423. <!-- 保存和重置 -->
  424. <div class="button_jl">
  425. <input value="保存" type="button"
  426. id="save" />&nbsp;&nbsp;<input value="保存并上报" type="button"
  427. id="saveandrelease" />&nbsp;&nbsp;<input value="重置" input
  428. type="button" onclick="formreset()" />
  429. </div><br /><fieldset class="fieldset">
  430. <legend class="legend">基本信息:</legend>
  431. <table class="add_table_style" >
  432. <tr>
  433. <td width="150px" align="right" class="class_color"><span class="star">*</span>响应报告填报要求:</td>
  434. <td ><select name="PLAN_ID_321"
  435. class="validate[required] selectWidth " swidth="90.5%"
  436. id="PLAN_ID_321" prompt="请选择" onchange="changeearlynum()"></select></td>
  437. </tr>
  438. <tr>
  439. <td width="150px" align="right" class="class_color"><span class="star">*</span>报告名称:</td>
  440. <td ><input readonly="readonly"
  441. name="REPORT_NAME_321" id="REPORT_NAME_321" type="text" value=""
  442. class="validate[required,length[0,100]] bg_readonly" maxlength=""
  443. style="width:90%"></td>
  444. </tr>
  445. <tr>
  446. <td width="150px" align="right"><span class="star">*</span>要求填报时间:</td>
  447. <td ><select name="PLAN_TIME_321" class="validate[required] selectWidth " swidth="90.5%"
  448. id="PLAN_TIME_321" prompt="请选择" ></select></td>
  449. </tr>
  450. </table>
  451. </fieldset>
  452. <div style="clear: both;"></div>
  453. <fieldset class="fieldset">
  454. <legend class="legend">各部门报表填报情况:</legend>
  455. <table class="tableStyle">
  456. <thead>
  457. <tr align="center" >
  458. <td width='20%'>部门</td>
  459. <td width='30%'>报表名称</td>
  460. <td width='20%'>计划时间</td>
  461. <td width='20%'>填报时间</td>
  462. <td width='10%'>填报人</td>
  463. </tr>
  464. </thead>
  465. <tbody id="baobiao">
  466. </tbody>
  467. </table>
  468. </fieldset>
  469. <fieldset class="fieldset">
  470. <div id="table_cont">
  471. <table id="event_con" class='this_table'>
  472. <tr>
  473. <td align='center' class='class_color' width='25%'><div class='font_bold' style='font-size:14px;'>选择事件:</div></td>
  474. <td align='center' class='class_color' width='75%'>
  475. <select editable=false id="EVENT_ID" selAlign="" selWidth="600"></select>
  476. </td>
  477. </tr>
  478. </table>
  479. <table class="btnTab this_table">
  480. <tr>
  481. <!-- <td align="center" class="class_color">
  482. <div>
  483. <input type="button" id="viewBaoBiaoBtn" value="查看报表填报情况" onclick="viewBaoBiao()" class="downBtn"/>
  484. </div>
  485. </td> -->
  486. <td align="center" class="class_color">
  487. <div>
  488. <input type="button" id="downLoad" value="点击自动生成工作专报" onclick="openu()" class="downBtn"/>
  489. </div>
  490. </td>
  491. </tr>
  492. </table>
  493. </div>
  494. <div class="font_red">
  495. 自动生成工作专报说明:需要关联相应的事件,根据选择的部门筛选出要查看的部门简报信息。
  496. </div>
  497. </fieldset>
  498. <div id="maingrid"></div>
  499. <div style="clear: both;"></div>
  500. <fieldset class="fieldset">
  501. <legend class="legend">附件信息:</legend>
  502. <!-- <div id="downloadMB">&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:openu()" class="red underline">点击这里</a>下载导入的excel数据模板</div> -->
  503. <table class="add_table_style file_table" >
  504. <tr>
  505. <td width="120px" align="right"><span align="right" class="star">*</span><span class="td-font">上传附件:</span></td>
  506. <td width="680px" colspan="3" ><div style="width:100%" id="fileDiv" name="fileDiv" ></div></td>
  507. </tr>
  508. </table>
  509. </fieldset>
  510. </form>
  511. </div>
  512. </body>