123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- var su = null;
- var fd_id = null;
- var re_id = null;
- var role_ids = null;
- $(function(){
- su = new SearchUtil();
- fd_id = su.resolveUrl().fd_id;
- re_id = su.resolveUrl().RESCUE_ID;
- role_ids = su.resolveUrl().role_id;
- if(role_ids.indexOf("R002105430335")>-1){//指挥看板操作员权限控制
- $("#caozuo").show();
- }
- if(su.resolveUrl().IS_PLAN=="0"){
- $(".describe").addClass("plan_td");
- }else{
- $(".describe").addClass("reality_td");
- };
-
- $("#RESCUE_ID_315").val(su.resolveUrl().RESCUE_ID);
- $("#IS_PLAN_315").val(su.resolveUrl().IS_PLAN);
- $("#CORRESPONDING_DATE_315").val(su.resolveUrl().CORRESPONDING_DATE);
- $("#INPUT_USER_ID_315").val(su.resolveUrl().user_id);
-
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var data = su.getJsonData(url, { classid : '314', objectID : re_id });
- $("#editForm").ajaxWrite({data:data});
- $("#PLAY_DELTA_T").html(su.DateDiff(data.PLAY_START_TIME_314, data.PLAY_END_TIME_314));
- $("#REALITY_DELTA_T").html(su.DateDiff(data.REALITY_START_TIME_314, data.REALITY_END_TIME_314));
-
- if(su.isLegitimate(fd_id)){
- $("#send_mes").html("修改");
- $("#del_mes").removeClass("hidden_yes");
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var data = su.getJsonData(url, { classid : '315', objectID : fd_id });
- $("#editInfoForm").ajaxWrite({data:data});
- $('input[name="classid"]').val('315');
-
-
- }else{//新增
- };
- $("#COMP_ID_314_SHOW").html(su.resolveUrl().dept_name);
- $("#INPUT_USER_ID_314_SHOW").html(su.resolveUrl().real_name);
-
- });
- $(function(){
- $("#send_mes").on("click",send_mes);
- $("#del_mes").on("click",del_mes);
- });
- function send_mes(){
- $form = $('#editInfoForm');
- var constr = $.trim($("#RESCUE_MESSAGE_315").val());
- if(!constr){
- top.Dialog.alert("备注内容不能为空!");
- return ;
- };
-
- var formValue = $form.serialize();
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- if(su.isLegitimate(fd_id)){
- url = $.pathname() +'/ws/crud/CRUDService/update/';
- };
- $.request.add(url,formValue,function(data){
-
- if(data.Msg.sucsess){
- url = '/nwyj/ws/icingZmap/IcingZmapService/loadRefreshResource' ;
- su.getJsonData(url,null);
- top.Dialog.close();
- }else{
- top.Dialog.alert(data.Msg.info);
- };
-
- });
-
-
- };
- /**
- * 重置
- */
- function reset_mes(){
- if(su.isLegitimate(fd_id)){
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var data = su.getJsonData(url, { classid : '314', objectID : fd_id });
- $("#RESCUE_COMP_ID_314").val(data.RESCUE_COMP_ID_314);
- $("#show_RESCUE_COMP_ID_314").val(data.RESCUE_COMP_ID_314_SHOW);
- $("#editForm").ajaxWrite({data:data});
- $('input[name="classid"]').val('314');
-
- }else{//新增
- $("#RESCUE_COMP_ID_314").val("");
- $("#IS_OVER").val("");
- $("input:radio[name=IS_OVER_314]").eq(0).attr("checked",true);
- $("#CONSTRUCTION_NAME_314").val("");
- $("#CONSTRUCTION_COMP_314").val("");
- $("#PLAY_START_TIME_314").val("");
- $("#PLAY_END_TIME_314").val("");
- $("#REALITY_START_TIME_314").val("");
- $("#REALITY_END_TIME_314").val("");
- };
- };
- /**
- * 删除
- */
- function del_mes(){
- var url = $.pathname() + '/ws/crud/CRUDService/delete/';
- var data = su.getJsonData(url, { classid : '315', objectIDs : fd_id });
- if(data.Msg.sucsess){
- url = '/nwyj/ws/icingZmap/IcingZmapService/loadRefreshResource' ;
- su.getJsonData(url,null);
- top.Dialog.close();
- };
- };
|