3974534c6dac230aff00684820414219a196e885.svn-base 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  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="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>预警通知单填报,修改</title>
  8. <%@include file="../../../../include1.jsp"%>
  9. <script type="text/javascript"
  10. src="<%=path%>/scripts/business/am/org/maintenance/orgSel.js"></script>
  11. <!--(遮罩)加载中开始-->
  12. <!--<script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/loading/loading.js"></script> -->
  13. <!--<link href="/nwyj/scripts/freamwork/com/sinosoft/system/loading/loading.css" rel="stylesheet" type="text/css"/> -->
  14. <!--(遮罩)加载中结束-->
  15. <%-- <script type="text/javascript" src="<%=path%>/scripts/business/em/alert/warning/WarningAddEdit.js"></script> --%>
  16. <!-- 20161121 -->
  17. <script type="text/javascript"
  18. src="<%=path%>/scripts/business/em/alert/warning/WarningAddEdit.js"></script>
  19. <style type="text/css">
  20. .class_color {
  21. background-color: rgb(237, 239, 253);
  22. }
  23. .inline_block {
  24. display: inline-block;
  25. vertical-align: middle;
  26. }
  27. </style>
  28. <script type="text/javascript">
  29. var fd_id = "<%=request.getParameter("fd_id")%>";
  30. //alert(fd_id);
  31. var is_adjst = "<%=request.getParameter("is_adjst")%>";
  32. //是否动态页签 true为是动态页签
  33. var isActivePage = "<%=request.getParameter("isActivePage")%>";
  34. //预警研判跳转 预警研判页面通知单的id_是
  35. var is_yanPan = "<%=request.getParameter("is_yanPan")%>";
  36. var alertNum=""; //预警编号
  37. var firstdiag;
  38. var dateTitle = "";
  39. var dateTitleId = "";
  40. var nowTime = "";//后台获取当前时间
  41. //取得用户真实名字
  42. var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  43. var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  44. //部门id
  45. var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
  46. //部门名称
  47. var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
  48. //父部门id
  49. var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
  50. var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
  51. var Corp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  52. var roleid = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
  53. var roleName = top.com.sinosoft.lz.system.user.LoginInfo.getRolenames();
  54. var parentId1 = "";//通过CorpArea(Corp_ids)查parentId
  55. var planMsg = "";
  56. var isLastId365 = "";//关联ID
  57. function getDateTime(){
  58. var s="";
  59. var d = allGetServerTime();
  60. var vYear = d.getFullYear();
  61. var vMon = d.getMonth() + 1;
  62. var vDay = d.getDate();
  63. var h = d.getHours();
  64. var m = d.getMinutes();
  65. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
  66. return s;
  67. }
  68. $(function(){
  69. $("#yjbh").live("change",function(){
  70. getYjNum();
  71. var node = $("#yjbh").data("selectedNode");
  72. if(node && node.report_type_id){
  73. $("#PLAN_TYPE_ID_365").val(node.report_type_id);
  74. }
  75. mouse("",1);
  76. inputEarlyWarningName();
  77. })
  78. if(isActivePage=="true"){
  79. //如果是动态页签,则隐藏返回按钮
  80. $("#back").parent().hide();
  81. }
  82. $.ajax({
  83. url : $.pathname()+ '/ws/response/responseService/getIssueUnitName',
  84. data : CorpArea,
  85. type : 'post',
  86. dataType : 'json',
  87. async : false,
  88. success : function(data){
  89. //alert(data.issueUnitName)
  90. $("#WRITE_DEPT_365_SHOW").text(data.issueUnitName);
  91. },error : function(e){
  92. top.Dialog.alert("系统错误!");
  93. }
  94. });
  95. var allTime = getDateTime();
  96. var nowYear = allTime.split("-")[0];
  97. $("#fbYear").val(nowYear);
  98. loadEventType();
  99. /** 查当前单位的parentId **/
  100. $.ajax({
  101. url : $.pathname() + '/ws/duty/DutyRecordsService/getparengId',
  102. type : 'post',
  103. timeout : 15000,
  104. data : CorpArea,
  105. dataType : 'text',
  106. async : false,
  107. success : function(theParentId){
  108. parentId1 = theParentId;
  109. },
  110. error : function(e){
  111. top.Dialog.alert("系统错误!");
  112. }
  113. });
  114. var defaultOpts={
  115. // 自动上传。
  116. auto : true,
  117. // swf文件路径
  118. swf : '/nwyj/scripts/webUploader/Uploader.swf',
  119. // 文件接收服务端。
  120. //server : '/nwyj/Upload',
  121. server : $.pathname() +"/ws/uploadForm/FileUpDownService/indexUpLoad",
  122. // 选择文件的按钮。可选。
  123. pick : '#picker',
  124. fileNumLimit: 5,
  125. fileSizeLimit: 200 * 1024 * 1024, // 200 M
  126. fileSingleSizeLimit: 50 * 1024 * 1024, // 50 M
  127. chunked: false,
  128. chunkSize: 512 * 1024,
  129. fileTypeLimit :"exe,jsp,asp",
  130. accept: {
  131. extensions: 'jpg,png,doc,docx,pdf'
  132. },
  133. /*
  134. formData: {},
  135. runtimeOrder: 'flash',
  136. */
  137. //禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。
  138. disableGlobalDnd: true
  139. };
  140. $('#fileDiv').newAsyncFileUpload(defaultOpts,fd_id,"1");
  141. $("#EARLY_WARNING_AREA_NAME_365").OrgSel({is_alert:"is_alert",is_alert:"is_alert",valuetype:"showunit_0003",selectedMulti : true,loadId_in:CorpArea,loadCorp:"loadCorp",setMulti : {
  142. "Y" : "s",
  143. "N" : ""
  144. }});
  145. if(fd_id.length>0 && is_adjst == 0){ //修改表单
  146. //加载附件列表
  147. $(".titleShow").text("修改预警发布通知单");
  148. $("#chongzhi2").show(); //显示重置按钮
  149. $('#CURRENT_EW_LEVEL_365').initCanstSelect('BM_WarningState'); //本次预警级别
  150. $('#PREV_EW_LEVEL').initCanstSelect('BM_WarningState'); //上次预警级别
  151. $("#PREV_EW_ID").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","IS_DEL=0 and IS_SEND = 5 and is_alert='0' and RELEASE_UNIT='"+CorpArea+"' and WRITER_ID='"+realName_ID+"' ");//上次预警单号
  152. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  153. var params = {
  154. classid : '365',
  155. objectID : fd_id
  156. };
  157. $.request.query(url,params,function(data){
  158. $('#editForm').ajaxWrite({data:data});
  159. $('#editForm input[name="classid"]').val('365');
  160. $("#show_EARLY_WARNING_AREA_NAME_365").val(data.EARLY_WARNING_AREA_NAME_365);
  161. $("#EARLY_WARNING_AREA_NAME_365").val(data.EARLY_WARNING_AREA_ID_365);
  162. $("#EARLY_WARNING_AREA_NAME_365_show").val(data.EARLY_WARNING_AREA_NAME_365);
  163. isLastId365 = data.IS_LAST_ID_365;
  164. var val = data.PLAN_TYPE_ID_365;
  165. if(val=='9'){
  166. var tempDate = data.TYPHOON_DATE_365;
  167. if(tempDate != null && tempDate != ''){
  168. $("#isTFDate").show();
  169. $("#typhoonDate").show();
  170. }else{
  171. $("#isTFDate").show();
  172. $(".IsTF[value='false']").attr('checked','checkked');
  173. }
  174. }
  175. $("#yjbh").setValue(data.MEET_EMERGENCIES_PLAN_365);//突发事件类型主键
  176. $("#WRITER_365").val(data.WRITER_365); //填报人
  177. $("#show_EARLY_WARNING_AREA_NAME_365").val(data.EARLY_WARNING_AREA_NAME_365);//预警范围显示
  178. $("#EARLY_WARNING_AREA_NAME_365").val(data.EARLY_WARNING_AREA_ID_365);//预警范围ID
  179. $("#EARLY_WARNING_AREA_NAME_365_show").val(data.EARLY_WARNING_AREA_NAME_365);//预警范围NAME
  180. //========================================================
  181. if(data.EARLY_WARNING_PROPERTY_365 == 50){ //预警性质 49是初次发布50是非初次发布(即调整)
  182. $("#WETHER_EW_ADJUST").attr("checked","checked");
  183. }else if(data.EARLY_WARNING_PROPERTY_365 == 49){
  184. $("#WARNING_PROPERTY").attr("checked","checked");
  185. }
  186. dateTitle = data.PLAN_TYPE_ID_365_SHOW;
  187. if("1"==data.WETHER_EW_ADJUST_365){
  188. mouse1(dateTitle);
  189. }else{
  190. mouse(dateTitle,1);
  191. }
  192. //========================================================上次预警级别
  193. var val = data.PREV_EW_ID_365;
  194. debugger;
  195. $.ajax({
  196. url : $.pathname() + '/ws/duty/DutyRecordsService/getlastLevel',
  197. type : 'post',
  198. timeout : 15000,
  199. data:val,
  200. dataType : 'text',
  201. async:false,
  202. success : function(result){
  203. var lastLevel = result;
  204. $("#PREV_EW_LEVEL").setValue(lastLevel);
  205. },
  206. error : function(e){
  207. top.Dialog.alert("保存失败");
  208. }
  209. });
  210. if(data.EARLY_WARNING_PROPERTY_365==50){
  211. //经过调整的记录,在修改页面加载上次预警编号和预警级别
  212. $('#PREV_EW_LEVEL').setValue(data.PREV_EW_LEVEL_365); //上次预警级别
  213. $('#PREV_EW_LEVEL').render();
  214. $("#PREV_EW_LEVEL_365").val(data.PREV_EW_LEVEL_365);
  215. $("#PREV_EW_ID").setValue(data.IS_LAST_ID_365); //上次预警单号
  216. $("#PREV_EW_ID").render();
  217. $("#WETHER_EW_ADJUST").attr("checked","checked");//那么预警调整被勾选
  218. }
  219. $("#show_EARLY_WARNING_AREA_NAME_365").val(data.EARLY_WARNING_AREA_NAME_365);
  220. $("#EARLY_WARNING_NAME_365").val(data.EARLY_WARNING_NAME_365);
  221. var yjNum = data.EARLY_WARNING_ID_365;
  222. mouse(yjNum[0]);//调整修改页面出不来
  223. console.log(yjNum);
  224. yjNum = yjNum.split("-");
  225. $("#is_chuci").val(yjNum[1]);
  226. $("#fbYear").val(yjNum[2]);
  227. $("#yj_num").setValue(yjNum[3]);
  228. });
  229. }else{//新增
  230. $(".titleShow").text("填报预警发布通知单");
  231. $("#chongzhi").show();//显示重置按钮
  232. $('#CURRENT_EW_LEVEL_365').initCanstSelect('BM_WarningState'); //本次预警级别
  233. $('#PREV_EW_LEVEL').initCanstSelect('BM_WarningState'); //上次预警级别
  234. $("#WARNING_PROPERTY").attr("checked","checked"); //预警性质--默认勾选初次
  235. $("#PREV_EW_ID").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","IS_DEL=0 and IS_SEND = 5 and is_alert='0' and RELEASE_UNIT='"+CorpArea+"' and WRITER_ID='"+realName_ID+"' ");//上次预警单号
  236. $("#EARLY_WARNING_PROPERTY_365").val(49); //预警性质 49 初次发布 50非初次发布 51 解除
  237. $("#WETHER_EW_ADJUST_365").val(0); //是否预警调整 0非预警调整1、是预警
  238. $("#CHECK_STATUS_365").val(41); //41初次 42调整 43解除 操作
  239. //默认选中登录人所属部门
  240. $('#WRITE_DEPT_365').val(CorpArea);
  241. //$("#WRITE_DEPT_365_SHOW").text(Corp_names);
  242. $("#RELEASE_UNIT_365").val(CorpArea);//发布单位
  243. $("#WRITER_365").val(realName); //填报人
  244. //$("#WRITER_365_SHOW").text(realName); //填报人
  245. $("#WRITER_ID_365").val(realName_ID); //填报人ID
  246. $("#is_chuci").val("F");
  247. }
  248. $.ajax({//后台获取系统当前时间
  249. url : $.pathname()+ '/ws/response/responseService/getNowTime',
  250. // data : {},
  251. type : 'post',
  252. dataType : 'text',
  253. async : false,
  254. timeout : 6000,
  255. success : function(result){
  256. nowTime=result;
  257. },error : function(e){
  258. top.Dialog.alert("获取后台时间失败!");
  259. return;
  260. }
  261. });
  262. $(".IsTF").bind("click",function(){
  263. var value = $(this).attr('value');
  264. if(value == 'true'){
  265. $("#dateTitle").text("预计台风登陆时间:");
  266. $("#typhoonDate").show();
  267. $("#TYPHOON_DATE_365").attr('class','date validate[required]');
  268. }else{
  269. $("#typhoonDate").hide();
  270. $("#TYPHOON_DATE_365").attr('class','date');
  271. $("#TYPHOON_DATE_365").val('');
  272. }
  273. });
  274. $("#CURRENT_EW_LEVEL_365").bind("change",function(){
  275. //预警级别
  276. var level = $("#CURRENT_EW_LEVEL_365").attr("relText");
  277. if(level == undefined || level == '请选择'){
  278. level = '';
  279. }
  280. if(dateTitle == undefined || dateTitle == '请选择'){
  281. dateTitle = '';
  282. }
  283. inputEarlyWarningName();
  284. //预警名称
  285. //$("#EARLY_WARNING_NAME_365").val(dateTitle+level);
  286. });
  287. $("#RELEASE_RELIEVE_DATE_365").on("blur",function(){//用于修改预警编号》》发布时间的改变
  288. var allTime = $(this).val();
  289. var nowYear = allTime.split("-")[0];
  290. mouse(nowYear,2);
  291. });
  292. $("#WARNING_PROPERTY").on("change",function(){//用于修改预警编号》》选择初次发布
  293. var isChecked = $(this).attr("checked");
  294. if(isChecked == "checked"){
  295. mouse("F",3);//如果预警调整被勾选-----2
  296. $(".titleShow").text("预警发布通知单");
  297. $("#titleShow_red").text("预警发布通知单");
  298. $("#PREV_EW_ID").resetValue();//上次预警单号重置
  299. $("#PREV_EW_ID").attr("disabled",true);//上次预警单号禁用
  300. $("#PREV_EW_ID").render();
  301. $("#WETHER_EW_ADJUST").attr("checked",false);
  302. }else{
  303. mouse("T",4);
  304. $(".titleShow").text("预警调整通知单");
  305. $("#titleShow_red").text("预警调整通知单");
  306. $("#PREV_EW_ID").attr("disabled",false);//上次预警单号解除禁用
  307. $("#PREV_EW_ID").render();
  308. $("#WETHER_EW_ADJUST").attr("checked",true);
  309. }
  310. });
  311. $("#WETHER_EW_ADJUST").on("change",function(){//用于修改预警编号》》选择调整
  312. var isChecked = $(this).attr("checked");
  313. if(isChecked == "checked"){
  314. mouse("T",4);
  315. $(".titleShow").text("预警调整通知单");
  316. $("#titleShow_red").text("预警调整通知单");
  317. $("#PREV_EW_ID").attr("disabled",false);//上次预警单号解除禁用
  318. $("#PREV_EW_ID").render();
  319. $("#WARNING_PROPERTY").attr("checked",false);
  320. }else{
  321. mouse("F",3);//如果预警调整被勾选-----2
  322. $(".titleShow").text("预警发布通知单");
  323. $("#titleShow_red").text("预警发布通知单");
  324. $("#PREV_EW_ID").resetValue();//上次预警单号重置
  325. $("#PREV_EW_ID").attr("disabled",true);//上次预警单号禁用
  326. $("#PREV_EW_ID").render();
  327. $("#WARNING_PROPERTY").attr("checked",true);
  328. }
  329. });
  330. });
  331. /*******自动输入预警/响应名称*************/
  332. function inputEarlyWarningName(){
  333. var yjbh = $("#yjbh").attr("reltext");
  334. var jb = $("#CURRENT_EW_LEVEL_365").attr("reltext");
  335. yjbh = !yjbh?"":yjbh;
  336. jb = !jb?"":jb;
  337. $("#EARLY_WARNING_NAME_365").val(yjbh+jb);
  338. }
  339. //修改重置
  340. function formReset2(){
  341. $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAddEdit.jsp?fd_id="+ fd_id+"&is_adjst=0");
  342. }
  343. //新增重置方法
  344. function formReset(){
  345. $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAddEdit.jsp?fd_id=&is_adjst=");
  346. }
  347. //预警编号--鼠标事件(填报,修改,转响应页面)--------初次
  348. function mouse(thing,num){//num的值【1:说明是预案的改变进来的】【2:说明是发布时间的改变进来的】【3:说明是选择了初次发布进来的】【4:说明是选择了调整进来的】
  349. if(thing == undefined || thing == '请选择'){
  350. thing = '';
  351. }
  352. //预警级别
  353. var level = $("#CURRENT_EW_LEVEL_365").attr("relText");
  354. if(level == undefined || level == '请选择'){
  355. level = '';
  356. }
  357. //预警名称
  358. //获取系统年份
  359. var year = allGetServerTime().getFullYear();
  360. var planTypeId = $("#PLAN_TYPE_ID_365").val();
  361. $("#PLAN_TYPE_ID_368").val(planTypeId);
  362. //=====================修改预警编号start
  363. var isF = $("#WARNING_PROPERTY").attr("checked");
  364. var isT = $("#WETHER_EW_ADJUST").attr("checked");
  365. var isForT = "";
  366. if(isF == "checked"){
  367. isForT = "F";
  368. $("#is_chuci").val("F");
  369. }else if(isT == "checked"){
  370. isForT = "T";
  371. $("#is_chuci").val("T");
  372. }
  373. //=====================修改预警编号end
  374. if(num == "2"){//-----------------【2:说明是发布时间的改变进来的】
  375. year = thing;
  376. }
  377. var params = {
  378. companyId : CorpArea,
  379. year : year,
  380. //isAdjust : 'F',
  381. isAdjust : isForT,
  382. isAlert:'0',
  383. plan_type_id : planTypeId
  384. };
  385. var url = $.pathname()+ '/ws/response/responseService/getAlertresponse';
  386. $.ajax({
  387. url : url,
  388. type : 'post',
  389. timeout : 60000,
  390. dataType : 'json',
  391. data : params,
  392. success : function(data) {
  393. /**************************20160615 ljp 根据需求,当有通知单不走系统时,会出现跳编号情况,这时候,查出当前最大编号,往后推十个号供选择**********************************/
  394. $("#NUM_368").val(data);
  395. data = Number(data);
  396. var dataJson = {"list":[]};
  397. var dataJson1 = {"list":[]};
  398. //=====================修改预警编号start
  399. var warningNum = $("#yj_num").attr("relText");//预警编号----防风防汛-F-2017-1
  400. warningNum += "";
  401. var thing1 = warningNum.split("-")[0];
  402. var getYear = warningNum.split("-")[2];
  403. if(thing1 == "undefined" || thing1 == undefined){
  404. thing1 = "";
  405. }
  406. if(getYear == "undefined" || getYear == undefined){
  407. getYear = year;
  408. }
  409. for (var i = 0; i < 10; i++) {
  410. if(data==0){
  411. data++;
  412. }
  413. if(data<10 && data>=0){
  414. dataJson1.list.push({"key":"00"+data,"value":"00"+data});
  415. }else if(data<100 && data>=10){
  416. dataJson1.list.push({"key":"0"+data,"value":"0"+data});
  417. }else{
  418. dataJson1.list.push({"key":data,"value":data});
  419. }
  420. data++;
  421. }
  422. if(num == "1"){//-----------------【1:说明是预案的改变进来的】
  423. for (var i = 0; i < 10; i++) {
  424. data++;
  425. alertNum = thing + "-" + "F" + "-" + year + "-" + data;
  426. dataJson.list.push({"key":alertNum,"value":alertNum});
  427. }
  428. }else if(num == "2"){//-----------------【2:说明是发布时间的改变进来的】
  429. for (var i = 0; i < 10; i++) {
  430. data++;
  431. alertNum = thing1 + "-" + "F" + "-" + thing + "-" + data;
  432. dataJson.list.push({"key":alertNum,"value":alertNum});
  433. }
  434. $("#fbYear").val(thing);
  435. }else if(num == "3"){//-----------------【3:说明是选择了初次发布进来的】
  436. for (var i = 0; i < 10; i++) {
  437. data++;
  438. alertNum = thing1 + "-" + "F" + "-" + getYear + "-" + data;
  439. dataJson.list.push({"key":alertNum,"value":alertNum});
  440. }
  441. }else if(num == "4"){//-----------------【4:说明是选择了调整进来的】
  442. for (var i = 0; i < 10; i++) {
  443. data++;
  444. alertNum = thing1 + "-" + "T" + "-" + getYear + "-" + data;
  445. dataJson.list.push({"key":alertNum,"value":alertNum});
  446. }
  447. }
  448. $("#COMPANY_ID_368").val(CorpArea);
  449. $("#YEAR_368").val(year);
  450. $("#yj_num").data("data",dataJson1);//<input>显示
  451. $("#yj_num").render();
  452. getYjNum();
  453. }
  454. });
  455. };
  456. //修改调整通知单时
  457. function mouse1(thing){
  458. if(thing == undefined || thing == '请选择'){
  459. thing = '';
  460. }
  461. //预警级别
  462. var level = $("#CURRENT_EW_LEVEL_365").attr("relText");
  463. if(level == undefined || level == '请选择'){
  464. level = '';
  465. }
  466. //预警名称
  467. //获取系统年份
  468. var year = allGetServerTime().getFullYear();
  469. var params = {
  470. companyId : CorpArea,
  471. year : year,
  472. isAdjust : 'T',
  473. isAlert:'0'
  474. };
  475. var url = $.pathname()+ '/ws/response/responseService/getAlertresponse';
  476. $.ajax({
  477. url : url,
  478. type : 'post',
  479. timeout : 60000,
  480. dataType : 'json',
  481. data : params,
  482. success : function(data) {
  483. /**************************20160615 ljp 根据需求,当有通知单不走系统时,会出现跳编号情况,这时候,查出当前最大编号,往后推十个号供选择**********************************/
  484. $("#NUM_368").val(data);
  485. data = parseInt(data)-1;
  486. var dataJson = {"list":[]};
  487. for (var i = 0; i < 10; i++) {
  488. data++;
  489. alertNum = thing + "-" + "F" + "-" + year + "-" + data;
  490. dataJson.list.push({"key":alertNum,"value":alertNum});
  491. }
  492. $("#COMPANY_ID_368").val(CorpArea);
  493. $("#YEAR_368").val(year);
  494. $("#yj_num").data("data",dataJson);//<input>显示
  495. $("#yj_num").render();
  496. }
  497. });
  498. };
  499. //初次发布的鼠标事件
  500. $(function(){
  501. /* $("#WARNING_PROPERTY").click(function(){
  502. if($("#WARNING_PROPERTY").attr("checked")=="checked"){//如果初次发布被勾选-----1
  503. $("#WETHER_EW_ADJUST").attr("checked",false);//那么预警调整不被勾选
  504. $(".titleShow").text("预警发布通知单");
  505. $("#PREV_EW_ID").resetValue();//上次预警单号重置
  506. $("#PREV_EW_LEVEL").setValue("请选择");//上次预警级别重置
  507. //mouse();
  508. $("#PREV_EW_LEVEL").attr("disabled",true);//上次预警级别禁用
  509. $("#PREV_EW_LEVEL").render();
  510. $("#PREV_EW_ID").attr("disabled",true);//上次预警单号禁用
  511. $("#PREV_EW_ID").render();
  512. }
  513. });
  514. //预警调整的鼠标事件
  515. $("#WETHER_EW_ADJUST").click(function(){
  516. if($("#WETHER_EW_ADJUST").attr("checked")=="checked"){//如果预警调整被勾选-----2
  517. $("#WARNING_PROPERTY").attr("checked",false);//那么初次发布不被勾选
  518. $(".titleShow").text("预警调整通知单");
  519. $("#PREV_EW_LEVEL").attr("disabled",false);//上次预警级别解除禁用
  520. $("#PREV_EW_LEVEL").render();
  521. $("#PREV_EW_ID").attr("disabled",false);//上次预警单号解除禁用
  522. $("#PREV_EW_ID").render();
  523. }
  524. }); */
  525. $(".templateSelect").bind("click",function(){
  526. if($(this).val() == "newTemplate"){
  527. $("#templateList").hide();
  528. $("#templateTitle").show();
  529. }else{
  530. $("#templateList").show();
  531. }
  532. });
  533. $("#PREV_EW_ID").bind("change",function(){
  534. var val=$(this).attr("relValue");
  535. if(val!=''){
  536. /* $.ajax({
  537. url : $.pathname() + '/ws/duty/DutyRecordsService/getlastLevel',
  538. type : 'post',
  539. timeout : 15000,
  540. data:val,
  541. dataType : 'text',
  542. success : function(result){
  543. var lastLevel = result;
  544. $("#PREV_EW_LEVEL").setValue(lastLevel);
  545. },
  546. error : function(e){
  547. top.Dialog.alert("保存失败");
  548. }
  549. }); */
  550. var name = $(this).attr("reltext");
  551. top.Dialog.confirm("是否调整"+name,function(){//点击确定--弹出调整页签
  552. top.createActiveTab("预警调整",$.pathname()+ "/page/business/em/alert/warning/WarningAdjust.jsp?fd_id="+ val+"&is_adjst="+1);
  553. });
  554. };
  555. });
  556. });
  557. function selectEarlyWarningNum(){
  558. var early_num = $("#yj_num").attr("relvalue");
  559. $("#NUM_368").val(early_num);
  560. getYjNum();
  561. }
  562. /******加载突发事件类型*********/
  563. function loadEventType(){
  564. $.ajax({
  565. url : $.pathname() + '/ws/sys/constantService/getAllEventType/',
  566. type : 'post',
  567. timeout : 60000,
  568. //data : { sql : AreaSql },
  569. dataType : 'json',
  570. async: false,
  571. success : function(data){
  572. $("#yjbh").data("data",data);
  573. $("#yjbh").render();
  574. getYjNum();
  575. }
  576. });
  577. }
  578. //查询预案Id——214
  579. function queryPlanId(planType){
  580. $.ajax({
  581. url : $.pathname() + '/ws/sys/constantService/getPlanId/',
  582. data : { unitId : CorpArea , planType : planType },
  583. type : 'post',
  584. dataType : 'text',
  585. async : false,
  586. success : function(resultData){
  587. if(resultData == null){
  588. planMsg = "noPlan";
  589. }else{
  590. planMsg = resultData.FD_OBJECTID+","+resultData.planName;
  591. }
  592. },error : function(e){
  593. }
  594. });
  595. }
  596. function getYjNum(){
  597. var event_type_name = $("#yjbh").attr("relText");
  598. $("#EARLY_WARNING_ID_365").val(event_type_name+"-"+$("#is_chuci").val()+"-"+$("#fbYear").val()+"-"+$("#yj_num").attr("relvalue"))
  599. $("#MEET_EMERGENCIES_PLAN_365").val($("#yjbh").attr("relValue"));
  600. }
  601. </script>
  602. </head>
  603. <body style="width: 1000px; margin: 0 auto; margin-top: 15px"
  604. align="center">
  605. <div class="box1" id="formContent"
  606. style="border: 1px solid #E4E4E4; background: #F8F8F8;" width="1000px">
  607. <!-- <div style="height: 50px; background: #F8F8F8;" align="center">
  608. <a href="javascript:;"> <img id="back" align="left" alt="返回"
  609. title="返回" src="/nwyj/images/temp/back.png" />
  610. </a> <font style="font-weight: bold; font-size: 20px; line-height: 45px;"
  611. class="titleShow"></font>
  612. </div> -->
  613. <form id="editForm" method="post">
  614. <input type="hidden" id="WRITE_DEPT_365" name="WRITE_DEPT_365" /> <input
  615. id="is_adjst" value='' type="hidden" /> <input name="classid"
  616. value="365" type="hidden" /> <input name="CHECK_STATUS_365"
  617. id="CHECK_STATUS_365" type="hidden" /> <input name="IS_SEND_365"
  618. id="IS_SEND_365" value="0" type="hidden" /> <input
  619. name="IS_LAST_ID_365" id="IS_LAST_ID_365" type="hidden" /> <input
  620. id="EARLY_WARNING_PROPERTY_365" name="EARLY_WARNING_PROPERTY_365"
  621. type="hidden" /> <input id="WETHER_EW_ADJUST_365"
  622. name="WETHER_EW_ADJUST_365" type="hidden" /> <input
  623. id="RELEASE_UNIT_365" name="RELEASE_UNIT_365" type="hidden" /> <input
  624. id="WRITE_TIME_365" name="WRITE_TIME_365" type="hidden" /> <input
  625. id="PREV_EW_LEVEL_365" name="PREV_EW_LEVEL_365" type="hidden" /> <input
  626. id="EARLY_WARNING_AREA_ID_365" name="EARLY_WARNING_AREA_ID_365"
  627. type="hidden" />
  628. <!-- <input id="PREV_EW_ID_365" name="PREV_EW_ID_365" type="hidden"/> -->
  629. <input type="hidden" name="FD_OBJECTID365" id="FD_OBJECTID365"
  630. value="" /> <input type="hidden" name="IS_ALERT_365"
  631. id="IS_ALERT_365" value="0" /> <input type="hidden"
  632. name="WRITER_ID_365" id="WRITER_ID_365" /> <input type="hidden"
  633. name="PLAN_TYPE_ID_365" id="PLAN_TYPE_ID_365" /> <input
  634. type="hidden" name="MEET_EMERGENCIES_PLAN_365"
  635. id="MEET_EMERGENCIES_PLAN_365" /> <input type="hidden"
  636. name="EVENT_ID_365" id="EVENT_ID_365" /> <input type="hidden"
  637. id="AGREE_ISSUE_LEADER_ID_365" name="AGREE_ISSUE_LEADER_ID_365" /> <input
  638. type="hidden" id="AGREE_ISSUE_LEADER_NAME_365"
  639. name="AGREE_ISSUE_LEADER_NAME_365" /> <input type="hidden"
  640. id="EARLY_WARNING_ID_365" name="EARLY_WARNING_ID_365" />
  641. <!-- 预警响应编号 -->
  642. <!-- 保存和重置 -->
  643. <br />
  644. <div style="float: right" id="divOfButton">
  645. <input type="button" id="is_Send" value="发送" />&nbsp;&nbsp; <input
  646. type="button" id="is_Issue" value="发布"
  647. title="上传盖章后的通知单附件,可以不经发送、审核直接发布" />&nbsp;&nbsp; <input value="保存"
  648. type="button" id="save" />&nbsp;&nbsp; <input id="chongzhi"
  649. style="display: none;" value="重置" onclick="formReset();"
  650. type="button" />
  651. <!-- 新增重置 -->
  652. <input id="chongzhi2" style="display: none;" value="重置"
  653. onclick="formReset2();" type="button" />
  654. <!-- 修改重置 -->
  655. </div>
  656. <br />
  657. <div align="center">
  658. <font style="font-weight: bold; font-size: 30px; line-height: 45px;"
  659. color="red" id="titleShow_red">预警发布通知单</font>
  660. </div>
  661. <!-- 填报单位和填报人 -->
  662. <table align="center" width="960px"
  663. style="padding-left: 10px; padding-right: 10px; margin: auto">
  664. <tr>
  665. <td align="left">
  666. <div style="float: left">
  667. <span>发布单位:</span>
  668. </div>
  669. <div style="float: left">
  670. <label id="WRITE_DEPT_365_SHOW"></label>
  671. <!-- <div class="selectTree" style="display: none;" selWidth="" id="WRITE_DEPT_365" name="WRITE_DEPT_365" ></div> -->
  672. </div>
  673. </td>
  674. <td align="right" style="padding-right: 60px;">签发人:<label
  675. id="WRITER_365_SHOW1"></label><input style="display: none;"
  676. id="WRITER_365" name="WRITER_365" type="text" /></td>
  677. </tr>
  678. </table>
  679. <!-- 正文表格 -->
  680. <table width="960px" class="tableStyle" align="center">
  681. <tr>
  682. <td align="right" width="120px" class="class_color"><span
  683. class="star">*</span>预警名称:</td>
  684. <td colspan="2"><input type="text" class="validate[required,custom[illegalLetter]]" maxLength="50"
  685. name="EARLY_WARNING_NAME_365" id="EARLY_WARNING_NAME_365" title="预警名称可根据所选预警编号和预警级别自动填入,无需手动输入"
  686. style="width: 750px;" /></td>
  687. </tr>
  688. <tr>
  689. <td align="right" width="120px" class="class_color"><span
  690. class="star">*</span>发布时间:</td>
  691. <td colspan="2"><input style="width: 750px" type="text"
  692. id="RELEASE_RELIEVE_DATE_365" name="RELEASE_RELIEVE_DATE_365"
  693. class="validate[required] date" dateFmt="yyyy-MM-dd HH:mm" /></td>
  694. </tr>
  695. <tr>
  696. <td align="right" width="120px" class="class_color"><span
  697. class="star">*</span>预警编号:</td>
  698. <td colspan="2">
  699. <div class='inline_block'>
  700. <select selWidth="288" editable=false class="validate[required]"
  701. id='yjbh' prompt="请选择" selAlign=""></select>
  702. </div>
  703. <div class='inline_block'>
  704. <input type="text"
  705. class="validate[required,custom[illegalLetter]]"
  706. readonly="readonly" maxLength="1" id='is_chuci'
  707. style="width: 100px; height: 30px;" />
  708. </div>
  709. <div class='inline_block'>
  710. <input type="text"
  711. class="validate[required,custom[illegalLetter]]"
  712. readonly="readonly" maxLength="4" id='fbYear'
  713. style="width: 100px; height: 30px;" />
  714. </div>
  715. <div class='inline_block'>
  716. <select selWidth="256" editable=false class="validate[required]"
  717. id="yj_num" selAlign="" onchange="selectEarlyWarningNum()"></select>
  718. </div>
  719. </td>
  720. </tr>
  721. <tr>
  722. <td align="right" width="120px" class="class_color"><span
  723. class="star">*</span>预警范围:</td>
  724. <!-- class="validate[required]" -->
  725. <td colspan="2"><div style="width: 826px;" allclickset="1"
  726. id="EARLY_WARNING_AREA_NAME_365"></div></td>
  727. </tr>
  728. <tr>
  729. <td align="right" width="120px" class="class_color"><span>预警性质:</span></td>
  730. <td width="420px"><input type="checkbox" id="WARNING_PROPERTY" /><label for='WARNING_PROPERTY'>初次发布</label></td>
  731. <td width="420px"><span>预警调整:</span> <input type="checkbox"
  732. id="WETHER_EW_ADJUST" /><label for='WETHER_EW_ADJUST'>预警调整</label><br />
  733. <div style="float: left">
  734. <span>上次预警单号:</span>
  735. </div>
  736. <div style="float: left">
  737. <select disabled="true" editable=false id="PREV_EW_ID"
  738. name="PREV_EW_ID_365" prompt="请选择" selWidth="246"></select>
  739. </div></td>
  740. </tr>
  741. <tr>
  742. <td align="right" width="120px" class="class_color"><span
  743. class="star">*</span><span>预警级别:</span></td>
  744. <td width="420px"><div style="float: left">
  745. &nbsp;<span>本次:</span>
  746. </div>
  747. <div style="float: left">
  748. <select name="CURRENT_EW_LEVEL_365" class="validate[required]"
  749. id="CURRENT_EW_LEVEL_365" selAlign="right" prompt="请选择"
  750. selWidth="300"></select>
  751. </div>&nbsp;&nbsp;</td>
  752. <td width="420px"><div style="float: left">
  753. &nbsp;<span>上次:</span>
  754. </div>
  755. <div style="float: left">
  756. <select disabled="true" id="PREV_EW_LEVEL"
  757. name="PREV_EW_LEVEL_365" selAlign="right" prompt="请选择"
  758. selWidth="290"></select>
  759. </div>&nbsp;&nbsp;</td>
  760. <!-- disabled="disabled" -->
  761. </tr>
  762. <tr>
  763. <td align="right" width="120px" class="class_color">预警概要:</td>
  764. <td colspan="2"><textarea maxNum="2000"
  765. style="width: 750px; height: 270px;" name="EW_SUMMARY_365"
  766. id="EW_SUMMARY_365"></textarea></td>
  767. </tr>
  768. <tr>
  769. <td align="right" width="120px" class="class_color">预防措施及<br>工作要求:</td>
  770. <td colspan="2"><textarea maxNum="2000"
  771. style="width: 750px; height: 270px;"
  772. name="MEASURE_AND_REQUEST_365" id="MEASURE_AND_REQUEST_365"></textarea>
  773. </td>
  774. <!-- id="templateContent" -->
  775. </tr>
  776. <tr>
  777. <td align="right" width="120px" class="class_color">备注:</td>
  778. <td colspan="2"><textarea maxNum="2000" name="REMARK_365"
  779. id="REMARK_365" style="width: 750px; height: 270px;"></textarea></td>
  780. </tr>
  781. </table>
  782. <fieldset
  783. style="border-color: #999999; border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); border-left-color: rgb(200, 200, 200); width: 960px"
  784. align="center">
  785. <legend width="960px">附件信息:</legend>
  786. <table width="960px" class="tableStyle" align="center">
  787. <tr>
  788. <td width="110px" class="class_color" align="right"><span>纸质扫描件:</span></td>
  789. <td colspan="2"><font color=red>只有领导审核、签发的word、pdf、图片(png/jpg)附件才可以上传直接发布</font></td>
  790. </tr>
  791. <tr>
  792. <td width="110px" class="class_color" align="right"><span
  793. align="right" class="star">*</span>上传附件:</td>
  794. <td width="750px" colspan="3"><div style="width: 750px"
  795. id="fileDiv" name="fileDiv"></div></td>
  796. </tr>
  797. </table>
  798. </fieldset>
  799. </form>
  800. <form id="alertResponseNumForm" method="post">
  801. <input name="classid" value="368" type="hidden" /> <input
  802. type="hidden" id="COMPANY_ID_368" name="COMPANY_ID_368" /> <input
  803. type="hidden" id="YEAR_368" name="YEAR_368" /> <input type="hidden"
  804. id="NUM_368" name="NUM_368" /> <input type="hidden"
  805. id="IS_ADJUST_368" name="IS_ADJUST_368" value="F" /> <input
  806. type="hidden" id="IS_ALERT_368" name="IS_ALERT_368" value="0" /> <input
  807. type="hidden" id="PLAN_TYPE_ID_368" name="PLAN_TYPE_ID_368"
  808. value="-1" />
  809. </form>
  810. </div>
  811. </body>
  812. </html>