2f23ecc1dcb715f08fe1d4461060c942131c7f85.svn-base 32 KB

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