//该文件中包含客户端需要处理的函数和事件 var showInfo; var turnPage = new turnPageClass(); //使用翻页功能,必须建立为全局变量 var turnPage1 = new turnPageClass(); //使用翻页功能,必须建立为全局变量 var turnPage2 = new turnPageClass(); //使用翻页功能,必须建立为全局变量 var mySql = new SqlClass(); /************************************************************************** * 领取操作保存按钮 * Transact: CG||INSERT ************************************************************************** */ function edorTypeCGSave() { if (!checkInput(InsuredOldGrid, "领取")) { return; } // if (!verifyInput2()) // { // return false; // } var showStr = "正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面"; var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + showStr; // showInfo=window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; 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(); document.all("fmtransact").value = "CG||INSERT"; document.getElementById("fm").action = "../API/grp_pa/g_pos/EdorCGSave/CGINSERT"; ajaxSubmit2(document.getElementById("fm")); } /************************************************************************** * 撤销领取操作保存按钮 * Transact: CG||DELETE ************************************************************************** */ function edorTypeCGDelete() { var ZTrownum = InsuredZTGrid.mulLineCount; if (ZTrownum == 0) { alert("请先进行领取操作!"); return; } var PContNo = InsuredZTGrid.getRowColData(0, 1); fm.all("PContNo").value = PContNo; var showStr = "正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面"; var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + showStr; // showInfo=window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; 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(); document.all("fmtransact").value = "CG||DELETE"; document.getElementById("fm").action = "../API/grp_pa/g_pos/EdorCGSave/CGDELETE"; ajaxSubmit2(document.getElementById("fm")); } function edorTypeCGFinish() { var showStr = "正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面"; var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + showStr; // showInfo=window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; 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.all('fmtransact').value = "G&Finish"; fm.action = "./GEdorTypeCGSubmit.jsp"; disPlayProcess('BQIMP003', 1 / 2, 5 / 6); fm.submit(); } /** * 提交后操作, 服务器数据返回后执行的操作 */ function afterSubmit(DealFlag, MsgContent) { try { showInfo.close(); } catch (ex) { } DealFlag = DealFlag.toLowerCase(); var MsgPageURL = "../common/jsp/MessagePage.jsp?picture="; switch (DealFlag) { case "fail": MsgPageURL = MsgPageURL + "F&content=" + MsgContent; // showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=250px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open(MsgPageURL, 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(); break; case "succ": case "success": MsgPageURL = MsgPageURL + "S&content=" + MsgContent; // showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=350px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open(MsgPageURL, 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(); break; default: MsgPageURL = MsgPageURL + "C&content=" + MsgContent; // showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=300px"); var name = '提示'; //网页名称,可为空; var iWidth = 550; //弹出窗口的宽度; var iHeight = 350; //弹出窗口的高度; var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置 var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置 showInfo = window.open(MsgPageURL, 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(); break; } //本文件的特殊处理 if (DealFlag == "succ" || DealFlag == "success") { try { queryBackFee(); top.opener.getEdorItemGrid(); } catch (ex) { } } queryClick(); queryLPCont(); } function queryClick() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorCGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryLCContByInsuredInfo"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(fm.ContNo1.value); tSQLInfo.addSubPara(fm.CustomerNo1.value); tSQLInfo.addSubPara(fm.Name1.value); tSQLInfo.addSubPara(fm.Sex1.value); tSQLInfo.addSubPara(fm.Birthday1.value); tSQLInfo.addSubPara(fm.IDType1.value); tSQLInfo.addSubPara(fm.IDNo1.value); turnPage1.queryModal(tSQLInfo.getString(), InsuredOldGrid, 1, 1); } /** * 返回主界面 */ function returnbak() { top.opener.initForm(); top.close(); } function queryLPCont() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorCGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryLPContByInsuredInfo"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(fm.Name2.value); tSQLInfo.addSubPara(fm.ContNo2.value); tSQLInfo.addSubPara(fm.CustomerNo2.value); tSQLInfo.addSubPara(fm.Sex2.value); tSQLInfo.addSubPara(fm.Birthday2.value); tSQLInfo.addSubPara(fm.IDType2.value); tSQLInfo.addSubPara(fm.IDNo2.value); turnPage2.queryModal(tSQLInfo.getString(), InsuredZTGrid, 1, 1, 10); } function checkInput(CheckGrid, Msg) { var checkAcount = 0; for (i = 0; i < CheckGrid.mulLineCount; i++) { if (CheckGrid.getChkNo(i)) { checkAcount++; break; } } for (i = 0; i < CheckGrid.mulLineCount; i++) { if (CheckGrid.getChkNo(i)) { if (CheckGrid.getRowColData(i,12)==null || CheckGrid.getRowColData(i,12)=="") { alert("第"+(i+1)+"行开户银行不能为空!"); return false; } if (CheckGrid.getRowColData(i,13)==null || CheckGrid.getRowColData(i,13)=="") { alert("第"+(i+1)+"行开户名不能为空!"); return false; } if (CheckGrid.getRowColData(i,14)==null || CheckGrid.getRowColData(i,14)=="") { alert("第"+(i+1)+"行账号不能为空!"); return false; } } } if (checkAcount < 1) { alert("请至少选择一个被保人进行" + Msg + "操作!"); return false; } return true; } function DiskImport() { window.open("./EdorInsuredDealMain.jsp?MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorAppNo="+tEdorAppNo,"人员清单处理",'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0'); } function verifyInput2() { var rowNumber = InsuredOldGrid.mulLineCount; var contNo, sql, arrResult; for (i = 0; i < insuredOldGrid.muLineCount; i++) { if (insuredOldGrid.getChkNo(i)) { contNo = insuredOldGrid.getRowColData(i, 1); sql = "select appflag from lccont where contno='" + contNo + "'"; try { arrResult = easyExecSql(sql, 1, 0); } catch (ex) { alert(ex); } if (arrResult != null) { if (arrResult[0][0] == 4) { alert("保单" + contNo + "已终止,不能做该批改项目"); return false; } } else { alert("查询保单信息失败"); return false; } } } }