31ec1f32ab3f28feed017b9b89364850fd779486.svn-base 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * 功能:应急预警报告添加及修改
  3. *
  4. *
  5. * @author HXB
  6. * @date 2015/12/01
  7. */
  8. SendWarning = 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/updateWarning/',
  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. $('.back').bind('click',function(){
  46. $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
  47. });
  48. }
  49. };
  50. }();
  51. $(function() {
  52. SendWarning.init();
  53. });