dc19f01363a36c215ba3f126fa9c021cfa3ddd74.svn-base 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. alert(33);
  34. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  35. }
  36. });
  37. }else{
  38. top.Dialog.alert('请选择下一节点处理人', null, null, null, -1);
  39. }
  40. };
  41. return {
  42. init : function() {
  43. $('#save').bind('click',function(){
  44. _this.save();
  45. });
  46. $("#goback").bind("click",function(){
  47. $(top.document.body).find("#frmright").attr("src","/nwyj/page/business/em/response/emergencyResponse/Warning.jsp");
  48. })
  49. }
  50. };
  51. }();
  52. $(function() {
  53. WarningReleaseMatter.init();
  54. $("#alterTime").on("click",alterRoundTime);
  55. });
  56. function alterRoundTime (){
  57. if(""==zqxIds){
  58. top.Dialog.alert("没有周期性时间,不能批量修改");
  59. return;
  60. }
  61. var roundTime = new top.Dialog();//定义一个窗口对象
  62. roundTime.Title = "修改周期性时间";//窗口标题
  63. roundTime.URL = "/nwyj/page/business/em/report/AlterTime.html";//窗口对应的页面
  64. roundTime.Height = 150;
  65. roundTime.Width= 500;
  66. roundTime.OKEvent = function(){
  67. roundTime.innerFrame.contentWindow.updateRoundTime();
  68. reportTable();
  69. };
  70. roundTime.CancelEvent = function(){
  71. roundTime.close();
  72. };
  73. //窗口Id
  74. roundTime.ID="showRoundTime";
  75. roundTime.ButtonAlign="center";//按钮居中
  76. roundTime.show();//显示窗口
  77. roundTime.OnLoad=function(){
  78. roundTime.innerFrame.contentWindow.showRoundTime(zqxIds);
  79. };
  80. }