1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- /**
- *
- * @author
- * @date 2015/09/14
- */
- /***保存信息***/
- function saveAlertReport(validaFormId){
- var filetest = hasFile();
- if(!filetest){
- top.Dialog.alert("附件不能为空!");
- return;
- }
- $("#fileDiv").val();
- var valid=$(validaFormId).validationEngine({returnIsValid: true});
- if(!valid){
- top.Dialog.alert(CHECKREDBOX);
- }
- $form=$('#editForm');
- if(valid){
- //$("#OPER_TIME_398").val((allGetServerTime()).Format("yyyy-MM-dd hh:mm:ss"));
- var params = {classid : "360"};
- var formValue = $('#editForm').serialize();
- //myFileToSave($('#editForm'),null,null);
-
- var url = $.pathname() +"/ws/uploadForm/FileUpDownService/asyncFileUpLoad";
- $("body").eq(0).showLoading();
- $.request.add(url,formValue,function(data){
- $("body").eq(0).hideLoading();
- top.Dialog.alert(data.Msg.info);
- var url = "/nwyj/page/business/em/report/operation/Operation.jsp";
- top.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url));
- });
- /*var url = $.pathname() + '/ws/uploadForm/FileUpDownService/fileUpLoad';
- if(fd_id!=undefined&&fd_id!=""){
- url = $.pathname() +"/ws/uploadForm/FileUpDownService/editlocation";
- }*/
- //myFileToSave($form,null,null,url);
- }
-
- }
- function myFileToSave($form,listGrid,msg,url){
- $("body").eq(0).showLoading();
- //表单异步提交处理
- $form.ajaxSubmit({
- type: 'post',
- url:url,
- //表单提交成功后的回调
- success: function(responseText, statusText, xhr, $form){
- $("body").eq(0).hideLoading();
- responseText = eval('('+responseText+')');
- closeProgress();
-
- if(msg!=undefined){
- if(responseText.info == 'success')
- top.Dialog.alert(msg+'成功!');//弹出提示
- else
- top.Dialog.alert(msg+'失败!');//弹出提示
- }else{
- if(responseText.info == 'success')
- top.Dialog.alert('保存成功!');//弹出提示
- else
- top.Dialog.alert('保存失败!');//弹出提示
- }
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/report/operation/Operation.jsp");
- }
- });
- }
- function update() {
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/report/operation/OperationAddEdit.jsp?fd_id=");
- };
-
- //返回主页面
- function goBack() {
- //获取iframe中的元素值
- var iframe =parent.document.getElementsByName("frmright")[0];
- iframe.src = "/nwyj/page/business/em/report/operation/Operation.jsp";
- }
-
|