// 该文件中包含客户端需要处理的函数和事件 var mDebug="0"; var mOperate=""; var showInfo; window.onfocus=myonfocus; //使得从该窗口弹出的窗口能够聚焦 function myonfocus() { if(showInfo!=null) { try { showInfo.focus(); } catch(ex) { showInfo=null; } } } //提交,保存按钮对应操作 function submitForm() { if (verifyInput()) { var i = 0; var showStr=i18nMessage("正在准备打印数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04536"); var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr); // showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:350px"); var name='提示'; //网页名称,可为空; var iWidth=550; //弹出窗口的宽度; var iHeight=250; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false); showInfo.focus(); //fm.hideOperate.value=mOperate; //if (fm.hideOperate.value=="") //{ // i18nAlert("操作控制数据丢失!", "LIS-01300"); //} //showSubmitFrame(mDebug); // document.getElementById("fm").submit(); //提交 //ajaxSubmit2(document.getElementById("fm")); downloadSubmit(fm,fm.action); setFormAllDisabled(); } } //提交后操作,服务器数据返回后执行的操作 function afterSubmit( FlagStr, content ) { alert("afterSubmit"); showInfo.close(); if (FlagStr == "Fail" ) { var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(content); //showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:350px"); var name='提示'; //网页名称,可为空; var iWidth=550; //弹出窗口的宽度; var iHeight=250; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false); showInfo.focus(); } else { var urlStr="../common/jsp/MessagePage.jsp?picture=S&content=" + encodeURIComponent(content); //parent.fraInterface.initForm(); //showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:350px"); var name='提示'; //网页名称,可为空; var iWidth=550; //弹出窗口的宽度; var iHeight=250; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false); showInfo.focus(); showDiv(operateButton,"true"); showDiv(inputButton,"false"); //执行下一步操作 } } //操作员日结以险种来打印财务收费日结单 function ORPrint() { var fmtransact="PRINT"; fm.action="../API/ind_finance/f1print/FinOpeDayF1PSave/ADD?fmtransact="+fmtransact; fm.target="f1print"; // fm.fmtransact.value="PRINT"; submitForm(); showInfo.close(); } //操作员日结以方式来打印财务收费日结单 function OMPrint() { var fmtransact="PRINT"; fm.action="../API/ind_finance/f1print/FinOpeDayF1PSave/ADD?fmtransact="+fmtransact; fm.target="f1print"; // fm.fmtransact.value="PRINT"; submitForm(); showInfo.close(); } //显示frmSubmit框架,用来调试 function showSubmitFrame(cDebug) { if(cDebug=="1") { parent.fraMain.rows = "0,0,50,82,*"; } else { parent.fraMain.rows = "0,0,0,82,*"; } } //Click事件,当点击“删除”图片时触发该函数 function deleteClick() { //下面增加相应的删除代码 if (i18nConfirm("您确实想删除该记录吗?", "LIS-00610")) { mOperate="DELETE||MAIN"; submitForm(); } else { mOperate=""; i18nAlert("您取消了删除操作!", "LIS-01292"); } } //显示div,第一个参数为一个div的引用,第二个参数为是否显示,如果为"true"则显示,否则不显示 function showDiv(cDiv,cShow) { if (cShow=="true") { cDiv.style.display=""; } else { cDiv.style.display="none"; } }