32bcc3c2978fdb95384917dae8c1dd84a16e809f.svn-base 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * 功能:应急预警报告添加及修改
  3. *
  4. *
  5. * @author HXB
  6. * @date 2015/12/17
  7. */
  8. WarningReleaseMatter = function() {
  9. /**定义变量**/
  10. var _this = this;
  11. /**新增方法**/
  12. _this.save = function(){
  13. $form = $('#editForm');
  14. var valid = $form.validationEngine({returnIsValid: true});
  15. if(valid){
  16. var params = {classid :"365",FD_OBJECTID365:$("#BUSINESS_ID_378").val(),IS_SEND_365 :"1"};
  17. $.ajax({
  18. url : $.pathname() + '/ws/crud/CRUDService/update/',
  19. type : 'post',
  20. timeout : 15000,
  21. data : params,
  22. dataType : 'json',
  23. success : function(data) {
  24. var url = $.pathname() + '/ws/crud/CRUDService/create/';
  25. var formValue = $form.serialize();
  26. $.request.add(url,formValue,function(data){
  27. closeProgress();
  28. top.Dialog.alert('发送成功!', null, null, null, -1);
  29. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
  30. });
  31. },
  32. error : function(e) {
  33. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  34. }
  35. });
  36. }else{
  37. top.Dialog.alert('请选择下一节点处理人', null, null, null, -1);
  38. }
  39. };
  40. return {
  41. init : function() {
  42. $('#save').bind('click',function(){
  43. _this.save();
  44. });
  45. $("#goback").bind("click",function(){
  46. $(top.document.body).find("#frmright").attr("src","/nwyj/page/business/em/response/emergencyResponse/Warning.jsp");
  47. })
  48. }
  49. };
  50. }();
  51. $(function() {
  52. WarningReleaseMatter.init();
  53. $("#alterTime").on("click",alterRoundTime);
  54. });
  55. function alterRoundTime (){
  56. if(""==zqxIds){
  57. top.Dialog.alert("没有周期性时间,不能批量修改");
  58. return;
  59. }
  60. var roundTime = new top.Dialog();//定义一个窗口对象
  61. roundTime.Title = "修改周期性时间";//窗口标题
  62. roundTime.URL = "/nwyj/page/business/em/report/AlterTime.html";//窗口对应的页面
  63. roundTime.Height = 150;
  64. roundTime.Width= 500;
  65. roundTime.OKEvent = function(){
  66. roundTime.innerFrame.contentWindow.updateRoundTime();
  67. reportTable();
  68. };
  69. roundTime.CancelEvent = function(){
  70. roundTime.close();
  71. };
  72. //窗口Id
  73. roundTime.ID="showRoundTime";
  74. roundTime.ButtonAlign="center";//按钮居中
  75. roundTime.show();//显示窗口
  76. roundTime.OnLoad=function(){
  77. roundTime.innerFrame.contentWindow.showRoundTime(zqxIds);
  78. };
  79. }