var showInfo; var turnPage = new turnPageClass();//系统使用 var turnPage1 = new turnPageClass(); var mOperate = "";//操作状态 var tSQLInfo = new SqlClass(); var tPrtSeq; /** * 提交,保存按钮对应操作 */ function submitForm() { var i = 0; var showStr = i18nMessage("正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04525"); var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr); //showInfo = window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px"); 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(); } /** * 提交后操作,服务器数据返回后执行的操作 */ function afterSubmit(FlagStr, content, filepath) { if (typeof (showInfo) == "object") { 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:250px"); 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); //showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px"); 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); // var filepath1 =filepath+tfileName; // window.location = "../API/grp_common/jsp/download/DOWNLOAD?FilePath="+filepath1+"&FileName="+tfileName; // window.location = encodeURI("../API/grp_common/jsp/download/APIDOWNLOAD?FilePath=" + filepath + "&FileName=" + tPrtSeq + ".pdf"); downloadFile(filepath,tPrtSeq + ".pdf","../API/grp_common/jsp/download/APIDOWNLOAD"); /* document.all("PrintPtrBtn").disabled = false; */ showInfo.focus(); } document.all("printButton").disabled = false; queryClick(0); } /** * 查询 */ function queryClick(tFlag) { if (fm.NoticeType1.value == null || fm.NoticeType1.value == "") { alert("通知书类型不能为空!") return false; } //系统的校验方法 if (!verifyInput2()) { return false; } if ((fm.EndDate.value != null && fm.EndDate.value != "") && (fm.StartDate.value == null || fm.StartDate.value == "")) { alert("起止日期需要同时录入!") return false; } if ((fm.StartDate.value != null && fm.StartDate.value != "") && (fm.EndDate.value == null || fm.EndDate.value == "")) { alert("起止日期需要同时录入!") return false; } var NoticeType1 = document.all("NoticeType1").value; if (NoticeType1 == '57') { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_print.TBNoticePrintSql"); tSQLInfo.setModule("grp_print"); tSQLInfo.setSqlId("TBNoticePrintSql1"); tSQLInfo.addSubPara(document.all("ManageCom").value); tSQLInfo.addSubPara(document.all("GrpPropNo").value); tSQLInfo.addSubPara(document.all("NoticeType1").value); tSQLInfo.addSubPara(document.all("SaleChnl").value); tSQLInfo.addSubPara(document.all("StartDate").value); tSQLInfo.addSubPara(document.all("EndDate").value); } var NoticeType1 = document.all("NoticeType1").value; if (NoticeType1 == '18') { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_print.TBNoticePrintSql"); tSQLInfo.setModule("grp_print"); tSQLInfo.setSqlId("TBNoticePrintSql6"); tSQLInfo.addSubPara(document.all("ManageCom").value); tSQLInfo.addSubPara(document.all("GrpPropNo").value); tSQLInfo.addSubPara(document.all("NoticeType1").value); tSQLInfo.addSubPara(document.all("SaleChnl").value); tSQLInfo.addSubPara(document.all("StartDate").value); tSQLInfo.addSubPara(document.all("EndDate").value); } // TBNoticePrintSql3 if (NoticeType1 == '17') { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_print.TBNoticePrintSql"); tSQLInfo.setModule("grp_print"); tSQLInfo.setSqlId("TBNoticePrintSql3"); tSQLInfo.addSubPara(document.all("ManageCom").value); tSQLInfo.addSubPara(document.all("GrpPropNo").value); tSQLInfo.addSubPara(document.all("NoticeType1").value); tSQLInfo.addSubPara(document.all("SaleChnl").value); tSQLInfo.addSubPara(document.all("StartDate").value); tSQLInfo.addSubPara(document.all("EndDate").value); } if (NoticeType1 == 'TB28' || NoticeType1 == 'TB21') { if (NoticeType1 == 'TB28'){ NoticeType1 = '28' } if (NoticeType1 == 'TB21'){ NoticeType1 = '21' } tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_print.TBNoticePrintSql"); tSQLInfo.setModule("grp_print"); tSQLInfo.setSqlId("TBNoticePrintSql2"); tSQLInfo.addSubPara(document.all("ManageCom").value); tSQLInfo.addSubPara(document.all("GrpPropNo").value); tSQLInfo.addSubPara(NoticeType1); tSQLInfo.addSubPara(document.all("SaleChnl").value); tSQLInfo.addSubPara(document.all("StartDate").value); tSQLInfo.addSubPara(document.all("EndDate").value); } turnPage1.queryModal(tSQLInfo.getString(), ContInfoGrid); if (!turnPage1.strQueryResult && tFlag == 1) { i18nAlert("未查询到符合条件的查询结果!", "LIS-03016"); } } /** * 保单打印 */ function print() { var i = ContInfoGrid.getSelNo(); if (i < 1) { i18nAlert("请选择保单信息!", "LIS-02439"); return false; } var tManageCom = ContInfoGrid.getRowColData(i - 1, 1); tPrtSeq = ContInfoGrid.getRowColData(i - 1, 2); var tGrpPropNo = ContInfoGrid.getRowColData(i - 1, 3); var tNoticeType = ContInfoGrid.getRowColData(i - 1, 4); // tSQLInfo = new SqlClass(); // tSQLInfo.setResourceName("g_print.LCGrpPrintSql"); // tSQLInfo.setModule("grp_print"); // tSQLInfo.setSqlId("LCGrpPrintSql2"); // tSQLInfo.addSubPara(tGrpContNo); // var tRiskCode = easyExecSql(tSQLInfo.getString(), 1, 0, 1, 1); // // if(tRiskCode!=null){ // // tSQLInfo = new SqlClass(); // tSQLInfo.setResourceName("g_print.LCGrpPrintSql"); // tSQLInfo.setModule("grp_print"); // tSQLInfo.setSqlId("LCGrpPrintSql3"); // tSQLInfo.addSubPara(tGrpContNo); // var tPrintCount = easyExecSql(tSQLInfo.getString(), 1, 0, 1); // if(tPrintCount=='1'){ // i18nAlert("该保单已打印!", "LIS-02440"); // return false; // } // } mOperate = "NoticePrint"; fm.action = "../API/grp_print/g_print/TBNoticePrintSave/Print?GrpPropNo=" + tGrpPropNo + "&PrtSeq=" + tPrtSeq; submitForm(); document.all("Operate").value = mOperate; document.all("NoticeType").value = tNoticeType; document.all("printButton").disabled = true; ajaxSubmit2(document.getElementById("fm"), resultAfterSubmit); //提交 } function resultAfterSubmit(FlagStr, Content, result) { afterSubmit(FlagStr, Content, result.filepath); }