/** * 功能: * * * @author * @date 2015/09/14 */ TranferAddEdit = function() { /**定义变量**/ var _this = this; /**私有方法**/ /***新增信息***/ _this.save = function(){ $form = $('#editForm'); var valid = $form.validationEngine({returnIsValid: true}); if(!valid){ top.Dialog.alert(CHECKREDBOX); } if(valid){ var teamPeopNo1 = $("#peopNO").val();//队伍总人数 var teamPeopNo2 = $("#POPULATION_395").val();//人数输入框填的人数 /*if(teamPeopNo2 > teamPeopNo1){ top.Dialog.alert("您输入的人数不能大于队伍总人数!"); return; }*/ var teamCount = $("#count").val(); if(teamCount==1){ showProgressBar("正在提交中..."); var teamRealName = $("#TEAM_NEAM_395").attr("relText"); $("#TEAM_REAL_NEAM_395").val(teamRealName);//保存队伍名称的NAME var formValue = $(".teamMsgForm").serialize(); //var url = 'nwyj/ws/crud/CRUDService/create/'; $("body").eq(0).showLoading(); $.ajax({ //url : $.pathname() + '/ws/crud/CRUDService/create/', url : $.pathname() +"/ws/uploadForm/FileUpDownService/asyncFileUpLoad",//附件保存 type : 'post', timeout : 15000, data : formValue, dataType : 'json', success : function(result){ $("body").eq(0).hideLoading(); top.Dialog.alert("保存成功!"); if(isWaitDo == 1){ $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/waitdo/waitDo.html"); }else{ $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/response/team/allotManage.jsp?pagenumber="+1); } //$('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/response/team/allotManage.jsp?pagenumber="+1); }, error : function(e){ top.Dialog.alert("保存失败"); } }); }else if(teamCount>1){ for(var i=0;i