12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /**
- * 功能:应急预警报告添加及修改
- *
- *
- * @author HXB
- * @date 2015/12/01
- */
- SendWarning = function() {
- /**定义变量**/
- var _this = this;
- /**新增方法**/
- _this.save = function(){
- $form = $('#editForm');
- var valid = $form.validationEngine({returnIsValid: true});
- if(valid){
- var params = {classid :"365",FD_OBJECTID365:$("#BUSINESS_ID_378").val(),IS_SEND_365 :"1"};
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/updateWarning/',
- type : 'post',
- timeout : 15000,
- data : params,
- dataType : 'json',
- success : function(data) {
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- var formValue = $form.serialize();
- $.request.add(url,formValue,function(data){
- closeProgress();
- top.Dialog.alert('发送成功!', null, null, null, -1);
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
- });
- },
- error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }else{
- top.Dialog.alert('请选择下一节点处理人', null, null, null, -1);
- }
-
- };
- return {
- init : function() {
- $('#save').bind('click',function(){
- _this.save();
- });
- $('.back').bind('click',function(){
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/alert/warning/Warning.jsp");
- });
- }
- };
- }();
- $(function() {
- SendWarning.init();
- });
|