123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716 |
- /**
- * 按钮
- * @author 郭恩乐
- * 2016-11-03
- */
- var user_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();//用户ID
- var role_ID = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();//用户多角色时,用逗号隔开
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var personId = "";//处理人ID
- var newWarningId = "";
- function buttonFun(){//按钮的显示情况
- getPersonMsg();
- //personId = isSeenBut.split(",")[0];//如果这样代码可以用,那么getPersonMsg()就可以不用
-
- //isSend : 1-待审核;3-待签发;4-待分发
- //根据状态判断该显示那些按钮
- //再根据登录人id是不是等于处理人id判断【根据状态判断该显示那些按钮】是否隐藏
-
- if(isSend == 0 && user_ID == writerIdBut){
- $("#sendBut").show();//【发送】
- $("#sendBut").after(" ");
- }
-
- if(isSend == 4 && user_ID == writerIdBut){
- $("#issueBut").show();//【发布】
- $("#issueBut").after(" ");
- }
-
- if(isSeenBut.split(",")[1] == 0 && isSeenBut.split(",")[2] == user_ID && isSend != 0){
- $("#rollBackBut").show();//【撤回】
- $("#rollBackBut").after(" ");
- }
-
- if(personId == user_ID){
- if(isSend == 1){
- if(currentLevel == 35 || currentLevel == 36){//红橙色、一二级
- $("#checkBut").show();//【审核】
- $("#checkBut").after(" ");
- }else if(currentLevel == 37 || currentLevel == 38){//黄蓝色、三四级
- $("#checkSignBut").show();//【审核并签发】
- $("#checkSignBut").after(" ");
- }
- }else if(isSend == 3){
- $("#signBut").show();//【签发】
- $("#signBut").after(" ");
- }else if(isSend == 4){
- $("#issueBut").show();//【发布】
- $("#issueBut").after(" ");
- }
- }
- }
- function rollBackButFun(){//撤回
- var isSeenMsg = isSeenBut;
- var isSeen_0 = isSeenMsg.split(",")[0];//下一节点处理人ID
- var isSeen_1 = isSeenMsg.split(",")[1];//下一节点处理人是(1)否(0)查看
- var isSeen_2 = isSeenMsg.split(",")[2];//处理人ID
- var stateNow = isSend;//通知单当前状态
- var stateNext = 0;//通知单撤回后的状态(0-待发送 1-待审核 2-撤回 3-待签发 4-待分发 5-已发布 6-结束)
-
- if(isSeen_1 == 1){
- top.Dialog.alert("下一节点处理人已经查看,不能撤回了!");
- return;
- }else if(isSeen_1 == 0){
- if(user_ID !=isSeen_2){
- top.Dialog.alert("下一流程已走完,不能撤回了!");
- return;
- } else if(user_ID == isSeen_2){
- if(stateNow == 1){//待审核
- stateNext = stateNow-1;//撤回到待发送
- }else if(stateNow == 3){//待签发
- stateNext = stateNow-2;//撤回到待审核
- }else if(stateNow == 4){//待分发
- if(noticeLevel == 37 || noticeLevel == 38){
- stateNext = stateNow-3;//撤回到待审核
- }else if(noticeLevel == 35 || noticeLevel == 36){
- stateNext = stateNow-1;//撤回到待分发
- }
- }
- }
-
- var params = {
- classid : "365",
- FD_OBJECTID365 : fd_id,
- //IS_SEND_365 : "0"
- IS_SEND_365 : stateNext,
- IS_SEEN_365 : "a,b,c"
- };
- top.Dialog.confirm("确定要撤回吗?|撤回", function() {
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/updateWarning/',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'json',
- success : function(data) {
- top.Dialog.alert('撤回成功!', null, null, null, -1);
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/Warning.jsp");
- //_this.listGrid.rend();
- },
- error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- });
- }
-
- }
- function sendButFun(){//发送
- if(ewpBut == 51){//解除
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningRelieve.jsp?fd_id="+ fd_id+"&is_edit=0");
- }else{//
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAddEdit.jsp?fd_id="+ fd_id+"&is_adjst=0");
- }
- }
- function checkButFun(){//审核
- if(ewpBut == 51){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/RelieveFlowAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+0);
- }else{
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+0);
- }
- }
- function checkSignButFun(){//审核并签发
- if(ewpBut == 51){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/RelieveFlowAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+0);
- }else{
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+0);
- }
- }
- function signButFun(){//签发
- if(ewpBut == 51){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/RelieveFlowAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+1);
- }else{
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningAuditIssue.jsp?fd_id="+ fd_id+"&is_audit="+1);
- }
- }
- function issueButFun(){//发布
- var planType = planType;//预案类型
- $("#PLAN_TYPE_ID_368").val(planType);
- var flag = -1;//是- 0 否- 1 走发布
-
- /** ***********************************start************************************** **/
- if(ewpBut == 49){
- //1.判断是否有同单位同类型预案已发布的预警通知单(如果有跳转到预警列表页面,没有,就继续)之前“发布通知单时,把本单位相同预案的其它通知单状态改为结束”去掉--updadeWarningStateTo6
- //2.判断是否有同单位同类型预案已发布的响应通知单(如果有跳转到响应列表页面,没有,就继续)
- $.ajax({//查询本单位是否有相同预案的通知单
- url : $.pathname() + '/ws/alertToImpl/AlertToImplService/getTZDNum/',//获取通知单记录条数
- data : {planTypeId : planType,//预案类型
- isAlert : "0" ,//预警or响应
- corpId : CorpArea,//单位ID
- fd_id : fd_id
- },
- type : 'post',
- timeout : 15000,
- dataType : 'text',
- async : false,
- success : function(data) {
- var aOrP = data.split(",")[0];//预警-0或响应-1
- var aOrPNum = data.split(",")[1];//通知单数量
- if(aOrP == "0"){
- if(aOrPNum > 0){
- flag = 1;
- top.Dialog.confirm("本单位有相同突发事件类型的预警通知单!请先处理!|预警",
- function(){//确定
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
- return;
- },
- function(){//取消
- top.Dialog.close();
- return;
- }
- );
- }else{
- flag = 0;
- }
- }else if(aOrP == "1"){
- if(aOrPNum > 0){
- flag = 1;
- top.Dialog.confirm("本单位有相同突发事件类型的响应通知单!请先处理!|预警",
- function(){//确定
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/response/emergencyResponse/Warning.jsp");
- return;
- },
- function(){//取消
- top.Dialog.close();
- return;
- }
- );
- }else{
- flag = 0;
- }
- }
- },error : function(e) {
- top.Dialog.alert("系统提示信息!");
- }
- });
- }
- /** *******************************end****************************************** **/
-
- if(flag == 0 || flag == -1){
- var is_send = '5';
- if(ewpBut == "51"){//解除
- is_send = '6';
- }
- // alert($("#EARLY_WARNING_ID_365").html())
- // alert($("#EARLY_WARNING_ID_365").html().split('-')[0])
- var num = getAlertNum($("#EARLY_WARNING_ID_365").html().split('-')[0],ewpBut);
- if("51" == ewpBut){
- num=$("#EARLY_WARNING_ID_365").html();
- }
- var params = {
- classid : "365",
- EARLY_WARNING_ID_365:num,
- FD_OBJECTID365 : fd_id,
- IS_SEND_365 : is_send,
- RELEASE_UNIT_365 : CorpArea
- };
-
- var url0 = $.pathname() + '/ws/human/TreateHumanService/updateTreateHumanDispose';
- var params0 = {
- personId_378 : user_ID,
- businessId_378 : fd_id,
- statues_378 : '4'
- };
- $.request.query(url0,params0,function(data){
- //alert(data);
- });
-
- top.Dialog.confirm("确定要发布吗?|发布", function() {
- $.ajax({//修改通知单状态
- url : $.pathname() + '/ws/crud/CRUDService/updateWarning/',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'json',
- success : function(data) {
- newWarningId = data.Msg.objectID;
-
- $.ajax({//发布通知单时,右下角弹框提示发布单位的下级和本级的应急办成员
- url : $.pathname() + '/ws/PlanHuiZong/ContingencyPlanHuiZong/tzdIssueDwr/',
- data : { fd_id : data.Msg.objectID },//参数为发布的通知单的ID
- type : 'post',
- timeout : 15000,
- dataType : 'text',
- async : false,
- success : function(data) {
-
- },error : function(e) {
- top.Dialog.alert("系统错误!");
- }
- });
-
- saveAddNum();
-
- if(isLastId != null && isLastId != ""){//调整或者解除
- var params = {
- classid : "365",
- FD_OBJECTID365 : isLastId,
- RELIEVE_DATE_365:getDateTime(),
- IS_SEND_365 : "6"
- };
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/update/',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'json',
- //async:false,
- success : function(data) {
- debugger;
- var eventId = $("#EVENT_ID_365").val();
- if(ewpBut != "51"){//如果不是解除
- finishPlan1(prevEWId,CorpArea)//上次响应编号、单位
- createPlan(dataMsg,eventId);
- console.log(456456456);
- $('#frmright',window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningReleaseMatter.jsp?fd_id="+ fd_id);
- //_this.listGrid.rend();
- }else{
- finishPlan($("#EARLY_WARNING_ID_365").html(),releaseUnitId,eventId,$("#EVENT_ID_365_SHOW").html());
- //_this.listGrid.rend();
- }
- top.Dialog.alert('发布通过!', null, null, null, -1);
- },error : function(e) {
- //$.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }else{
- var eventType = dataMsg.MEET_EMERGENCIES_PLAN_365;
- var time = dataMsg.RELEASE_RELIEVE_DATE_365;
- time = time.split(" ")[0];
- var noticeId = dataMsg.FD_OBJECTID365;
- var compId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var eventId = createEventByNotice(eventType,time,compId,noticeId);//生成事件名称,并返回事件id
- $("#EVENT_ID_365").val(eventId);
- dataMsg.EVENT_ID_365 = eventId;
- $("#IS_SEND_365").val(5);
- createPlan(dataMsg,eventId);
- }
- },error : function(e) {
- //$.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
-
- $.ajax({//发布以后,用推送的方式,调用首页的方法,更新首页导航下方滚动的预警通知单信息(不需要传参数)
- url : $.pathname() + '/ws/alertToImpl/AlertToImplService/updadeWarningMsgOfMainPage/',
- type : 'post',
- timeout : 15000,
- //data : params,
- dataType : 'text',
- success : function(data) {
-
- },error : function(e) {
- //$.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
-
- var jkUrl = "";//发布通知单时,调用接口的url
- var tzdProperty = ewpBut;//通知单预警性质
- if(tzdProperty == "51"){//解除
- jkUrl = $.pathname() + '/ws/alertToImpl/AlertToImplService/alertRelieveIssue/';
- }else if(tzdProperty == "49" || tzdProperty == "50"){//初次或调整
- jkUrl = $.pathname() + '/ws/alertToImpl/AlertToImplService/alertIssue/';
- }
-
- $.ajax({
- url : jkUrl,
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'text',
- success : function(data) {
-
- },error : function(e) {
- //$.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- });
- }
- }
- function getAlertNum(thing,alertQuality){
-
- //获取系统年份
- var year = allGetServerTime().getFullYear();
- var quality = "F";
- if(alertQuality == '49'){
- quality = "F";
- }else{
- quality = "T";
- }
- var params = {
- companyId : CorpArea,
- year : year,
- isAdjust : quality,
- isAlert:'0',
- plan_type_id : $("#PLAN_TYPE_ID_368").val()
- };
-
- var url = $.pathname()+ '/ws/response/responseService/getAlertresponse';
- $.ajax({
- url : url,
- type : 'post',
- timeout : 60000,
- dataType : 'json',
- data : params,
- async : false,
- success : function(data) {
- $("#IS_ADJUST_368").val(quality);
- $("#COMPANY_ID_368").val(CorpArea);
- $("#YEAR_368").val(year);
- $("#NUM_368").val(data);
- var length = data.length;
- for (var int = 0; int < 3-length; int++) {
- data = "0"+data;
- }
- alertNum = thing + "-" + ""+quality+"" + "-" + year + "-" + data;
- }
- });
- return alertNum;
- };
- //结束报表
- function finishPlan1(alertNum,companyId){
- var params = {WARNING_NUMBER:alertNum,COMP_ID:companyId,IS_ALERT:"0"};
- $.ajax({
- url : $.pathname() + '/ws/getPlanRequires/getPlanRequireService/releasePlan',
- type : 'post',
- timeout : 15000,
- async : false,
- data : params,
- dataType : 'text',
- success : function(data) {
- }
- });
- }
- /**
- * 结束报表填报计划
- */
- function finishPlan(alertNum,companyId,event_id,event_name){
- var params = {WARNING_NUMBER:alertNum,COMP_ID:companyId,IS_ALERT:"0"};
- $.ajax({
- url : $.pathname() + '/ws/getPlanRequires/getPlanRequireService/releasePlan',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'text',
- success : function(data) {
- var event_unit_id = queryEventInfo(event_id);
- if(event_unit_id==CorpArea){
- top.Dialog.confirm("发布通过,是否结束"+event_name+"事件?",function(){
- finishedEvent(event_id,event_name);
-
- },function(){
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp?yj_dangqian");
-
- });
- }else{
- top.Dialog.alert('发布通过!', null, null, null, -1);
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp?yj_dangqian ");
- }
-
- }
- });
- }
- function saveAddNum(){
- var $form1 = $('#alertResponseNumForm');
- var formValue = $form1.serialize();
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- $.request.add(url,formValue,function(data){
- //$('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningReleaseMatter.jsp?fd_id="+ fd_id);
- });
- };
- /**
- * 替换计划
- */
- function updatePlan(oldAlert,newAlert,companyId,meet_plan_id,typhoon,alertLevel,areaId,areaName,men_url){
- var circleTime = getPlanTime(meet_plan_id,typhoon,alertLevel);
- var params = {OLD_WARN:oldAlert,NEW_WARN:newAlert,COMP_ID:companyId,'isAlert':'0',circleTime:circleTime,areaName:areaName,areaId:areaId};
- $.ajax({
- url : $.pathname() + '/ws/getPlanRequires/getPlanRequireService/updatePlan',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'text',
- success : function(data) {
- $('#frmright', window.parent.document).attr('src',men_url);
- }
- });
- }
- /**
- * 创建报表填报计划
- */
- function createPlan(row,eventId){
- var alertLevel = row.CURRENT_EW_LEVEL_365;
- $.ajax({
- url : $.pathname() + '/ws/sendmenu/SendMsgService/getReportAndPlanTime',
- type : 'post',
- data : {"event_type_id":row.MEET_EMERGENCIES_PLAN_365,"event_level":alertLevel,"comp_id":CorpArea},
- dataType : 'text',
- async:false,
- success : function(data) {
- if(data != null && data != ""){
-
- var istemporary = "周期性";
- var alertDate = data; //周期时间
- var temporaryTime = ""; //临时时间
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var Corp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var role_ids = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();//角色id
- var real_name = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name;//用户名?还是角色名?这里需要用户名
- var alertName =row.EARLY_WARNING_NAME_365;//预警名称
- var areaId = row.EARLY_WARNING_AREA_ID_365;//预警范围部门id
- var areaName = row.EARLY_WARNING_AREA_NAME_365;//预警范围部门名称
- var isAlert = "0";//预警还是响应
-
- $.ajax({//后台获取系统当前时间
- url:$.pathname()+ '/ws/response/responseService/getNowTime',
- type : 'post',
- dataType : 'text',
- async : false,
- success : function(result){
- nowTime=result;
- },error : function(e){
- return;
- }
- });
- parmas = {
- WARNING_NUMBER : alertNum,
- START_TIME : nowTime.substring(0, nowTime.lastIndexOf(":")),
- FILL_IN_SCHEDULE : istemporary,
- DEPT_ID : CorpArea,
- ROUND_TIME : alertDate,
- TEMPORARY_TIME : temporaryTime,
- USER_ID : userId,
- ROLE_ID : role_ids,
- deptName : Corp_names,
- real_name : real_name,
- alertName : alertName,
- areaId : areaId,
- areaName : areaName,
- isAlert : isAlert,
- alertLevel : alertLevel,
- eventType:row.MEET_EMERGENCIES_PLAN_365,
- eventId:eventId
- };
- $.ajax({
- url : $.pathname() + '/ws/getPlanRequires/getPlanRequireService/createPlanByAlert',
- type : 'post',
- timeout : 15000,
- data : parmas,
- dataType : 'json',
- async: false,
- success : function(data) {
- top.Dialog.alert('发布通过!', null, null, null, -1);
- }
- });
- }else{
- top.Dialog.alert('该突发事件类型没有配置报表报告计划!');
- top.Dialog.alert('发布通过!', null, null, null, -1);
- };
- },
- error : function(e) {
- $.messager.alert( '访问服务失败!');
- }
- });
- }
- function getPersonMsg(){
- //alert("fd_id="+fd_id+"\n isSend="+isSend);
- if(isSend != 0){
- $.ajax({//查询表【ECM_EM_TREATED_HUMAN】中的处理人ID
- url : $.pathname() + '/ws/sendsms/SendSmsService/getHumanMsg',
- data : { fd_id : fd_id , isSend : isSend},
- type : 'post',
- dataType : 'json',
- timeout : 666666,
- async : false,
- success : function (resultData){
- personId = resultData.personId;//处理人ID
- },error : function (e){
- top.Dialog.alert("系统错误!");
- }
- });
- }
- }
- /****
- * 根据id查询事件信息
- */
- function queryEventInfo(event_id){
- var unit_id = "";
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '363',
- objectID : event_id
- };
- $.ajax({
- url : url,
- type : 'post',
- data : params,
- dataType : 'json',
- async:false,
- success : function(data) {
- unit_id = data.ISSUE_UNITE_ID_363;
- },
- error : function(e) {
- // $.messager.alert('访问服务失败!55', 'error');
- }
- });
- return unit_id;
- }
- /****
- * 根据id结束事件
- */
- function finishedEvent(event_id,event_name){
- var params = {
- classid : "363",
- FD_OBJECTID363 : event_id,
- EVENT_STATE_363 : "2"
- };
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/update/',
- type : 'post',
- data : params,
- dataType : 'json',
- success : function(data) {
- top.Dialog.alert(event_name+'事件已经结束!', null, null, null, -1);
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
- },
- error : function(e) {
- $.messager.alert('结束事件失败!');
- }
- });
- }
- /**
- * 生成事件的方法
- * @param _url 要跳转的页面路径
- * @param eventType 事件类型id
- * @param time 事件日期
- * @param compId 发布单位id
- * @param compName 发布单位name
- */
- function createEventByNotice(eventType,time,compId,noticeId){
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var eventId = "";
- $.ajax({
- url : $.pathname() + '/ws/response/responseService/creteEventByNotice/',
- data : {
- "eventType":eventType,
- "time":time,
- "compId":compId,
- "input_per_name":realName,
- "input_per_id":realName_ID
- },
- type : 'post',
- dataType : 'text',
- async:false,
- success : function(data) {
- eventId = data;
- updateNoticeEvent(noticeId,eventId);
- updateNewEvent(data);
- },
- error:function(e){
- console.log("生成事件名称失败!");
- }
- });
- return eventId;
- }
- /***
- * 修改通知单的事件id字段
- * @param noticeId
- * @param data
- */
- function updateNoticeEvent(noticeId,eventId){
- var params = {
- classid : "365",
- FD_OBJECTID365 : noticeId,
- EVENT_ID_365:eventId
- };
- $.ajax({//发布通知单时,把本单位相同预案的其它通知单状态改为结束--6(并归档)
- url : $.pathname() + '/ws/crud/CRUDService/updateWarning/',
- data : params,
- type : 'post',
- dataType : 'json',
- success : function(data) {
- console.log("修改通知单事件字段成功!");
- },error : function(e) {
- console.log("修改通知单事件字段失败!");
- }
- });
- }
- /**
- * 修改事件名称
- */
- function updateNewEvent(eventId){
- var diag = new top.Dialog();
- diag.Title = '事件名称';
- diag.URL = $.pathname() + '/page/business/em/alert/warning/WarningEvent.jsp?fd_id='+eventId;
- diag.OkButtonText = '确定';
- diag.ShowCloseButton = false;
- diag.ShowCancelButton = false;
- diag.OKEvent = function(){
- var flag = diag.innerFrame.contentWindow.saveUpdateEvent();
- if(flag){
- diag.close();
- guanLianEvent(eventId);//关联事件
- }
-
- };
- diag.Width = 800; //宽度
- diag.Height = 200; //宽度
- diag.ButtonAlign = 'center';
- diag.show();
- }
- /**
- * 关联事件
- */
- function guanLianEvent(fd_id){
- var diag = new top.Dialog();
- diag.Title = '关联事件';
- diag.URL = $.pathname() + "/page/business/em/alert/warning/WarningEventGuanLian.jsp?fd_id="+newWarningId;
- diag.OkButtonText = "确定";
- diag.CancelButtonText = "不关联";
- diag.OKEvent = function(){
- diag.innerFrame.contentWindow.updateAndAddEventGuanLian();
- diag.close();
- $('#frmright',window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningReleaseMatter.jsp?fd_id="+ newWarningId);
- };
- diag.CancelEvent = function(){
- diag.close();
- $('#frmright',window.parent.document).attr('src',$.pathname()+ "/page/business/em/alert/warning/WarningReleaseMatter.jsp?fd_id="+ newWarningId);
- };
- diag.Width = 600; //宽度
- diag.Height = 400; //宽度
- diag.ButtonAlign = 'center';
- diag.show();
- }
|