//该文件中包含客户端需要处理的函数和事件 var mDebug="0"; var mOperate=""; var showInfo; var arrDataSet; var turnPage = new turnPageClass(); var turnPage2 = new turnPageClass(); var turnPage3 = new turnPageClass(); var turnPage4 = new turnPageClass(); var turnPageBackFeeGDetail = new turnPageClass(); //全局变量, 团单补退费费用明细, 翻页必须有 var turnPageBackFeePDetail = new turnPageClass(); var QueryResult=""; var QueryCount = 0; var mulLineCount = 0; var QueryWhere=""; var initDataSet; var arrResult=new Array(); var arrResult2=new Array(); window.onfocus=myonfocus; var tSQLInfo = new SqlClass(); //显示div,第一个参数为一个div的引用,第二个参数为是否显示,如果为"true"则显示,否则不显示 function showDiv(cDiv,cShow){ if (cShow=="true"){ cDiv.style.display=""; } else{ cDiv.style.display="none"; } } //显示frmSubmit框架,用来调试 function showSubmitFrame(cDebug){ if(cDebug=="1"){ parent.fraMain.rows = "0,0,0,0,*"; } else { parent.fraMain.rows = "0,0,0,82,*"; } parent.fraMain.rows = "0,0,0,0,*"; } //数据提交(保存) function submitForm(){ if(!checkInput(BonusGetGrid)) { return; } 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/EdorHGSave/ADD"; ajaxSubmit2(document.getElementById("fm")); } function afterSubmit(FlagStr,content){ showInfo.close(); if( FlagStr == "Fail" ){ var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + content ; // showModalDialog(urlStr,window,"status:no;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 (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{ content = "操作成功!"; var urlStr = "../common/jsp/MessagePage.jsp?picture=S&content=" + content ; // showModalDialog(urlStr,window,"status:no;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 (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(); initForm(); queryBackFee(); } } function Edorquery() { if(tActivityID == "1800401002"){ divEdorquery.style.display = ""; }else{ divEdorquery1.style.display = ""; } } function getGrpPolNo() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorHGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryLCGrpPolGrpPolNoByGrpContNoRiskCode"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(fm.RiskCode.value); turnPage.strQueryResult = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1); if (turnPage.strQueryResult) { turnPage.arrDataCacheSet = decodeEasyQueryResult(turnPage.strQueryResult); fm.all('GrpPolNo').value=turnPage.arrDataCacheSet[0][0]; } } function GrpPerPolDefine() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorHGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryLCGrpContInfoByGrpContNo"); tSQLInfo.addSubPara(tGrpContNo); turnPage2.strQueryResult = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1); if (turnPage2.strQueryResult) { turnPage2.arrDataCacheSet = decodeEasyQueryResult(turnPage2.strQueryResult); fm.all('ProposalGrpContNo').value = turnPage2.arrDataCacheSet[0][1]; fm.all('AppntNo').value = turnPage2.arrDataCacheSet[0][3]; fm.all('GrpName').value = turnPage2.arrDataCacheSet[0][4]; } } function BonusGetQuery() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorHGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryLJSGetDrawInfoByGrpContNo"); tSQLInfo.addSubPara(tGrpContNo); turnPage3.queryModal(tSQLInfo.getString(), BonusGetGrid); } function checkInput(CheckGrid) { var checkAcount = 0; for (i = 0; i < CheckGrid.mulLineCount; i++) { if (CheckGrid.getChkNo(i)) { checkAcount++; break; } } if (checkAcount < 1) { alert("请至少选择一条红利信息进行领取操作!"); return false; } return true; } function initInpBox() { try { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorHGSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("queryEdorAppDateAndEdorValiDate"); tSQLInfo.addSubPara(tEdorAppNo); turnPage4.strQueryResult = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1); if (turnPage4.strQueryResult) { turnPage4.arrDataCacheSet = decodeEasyQueryResult(turnPage4.strQueryResult); fm.all('EdorItemAppDate').value = turnPage4.arrDataCacheSet[0][0]; fm.all('EdorValiDate').value = turnPage4.arrDataCacheSet[0][1]; // fm.all('EdorItemAppDate').value = aa[0][1]; // fm.all('EdorValiDate').value = aa[0][2]; fm.all('EdorAcceptNo').value = tEdorAppNo; fm.all('GrpContNo').value = tGrpContNo; fm.all('EdorType').value = tEdorType; fm.all('EdorNo').value = tEdorNo showOneCodeName('EdorCode', 'EdorType', 'EdorTypeName'); } } catch (ex) { alert("在GEdorTypeHGInit.jsp-->InitInpBox函数中发生异常:初始化界面错误!"); } } /** * 返回主界面 */ function returnbak() { top.opener.initForm(); top.close(); } /** * 执行团单和分单明细补退费查询 */ function queryBackFee() { if (tEdorAppNo == null || trim(tEdorAppNo) == "") { alert("警告:无法获取保全受理号。查询补退费失败! "); return; } if (tEdorType == null || trim(tEdorType) == "") { alert("警告:无法获取保全项目。查询补退费失败! "); return; } //满足查询条件, 执行查询 queryBackFeeTotalMoney(); //补退费金额合计 queryBackFeeGDetailGrid(); //团单补退费费用明细查询 queryBackFeePDetailGrid(); //分单补退费费用明细查询 } /** * 查询补退费金额合计 */ function queryBackFeeTotalMoney() { var arrResult; tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.GEdorFeeDetailControllerSql"); tSQLInfo.setSqlId("queryLPGrpEdorItemByEdorAcceptNoAndEdorType"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorType); try { arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, "", "", 1); //注意此处第6个参数应设为1,不使用翻页功能,否则可能会把全局变量 turnPage 覆盖 } catch (ex) { alert("警告:查询补退费金额合计出现异常! "); return; } if (arrResult != null) { try { document.getElementsByName("BackFeeGetMoney")[0].value = arrResult[0][0]; } catch (ex) { } } } /** * 团单补退费费用明细 MultiLine 的查询 */ function queryBackFeeGDetailGrid() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.GEdorFeeDetailControllerSql"); tSQLInfo.setSqlId("queryLDCodeConfigInfoByCodeTypeAndCode"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorType); //alert(QuerySQL); // 团险优化换人优化需求 shiyu try { turnPageBackFeeGDetail.queryModal(tSQLInfo.getString(), BackFeeGDetailGrid); } catch (ex) { alert("警告:查询补退费费用明细出现异常! "); return; } //团单和分单补退费明细层的显示与隐藏 if (BackFeeGDetailGrid.mulLineCount > 0) { try { document.all("divBackFeeDetailLayer2").style.display = ""; } catch (ex) { } } else { try { document.all("divBackFeeDetailLayer2").style.display = "none"; } catch (ex) { } } } /** * 分单补退费费用明细 MultiLine 的查询 */ function queryBackFeePDetailGrid() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.GEdorFeeDetailControllerSql"); tSQLInfo.setSqlId("queryLJSGetEndorseByManeyInfo"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorType); //alert(QuerySQL); // 团险换人优化需求 shiyu try { turnPageBackFeePDetail.queryModal(tSQLInfo.getString(), BackFeePDetailGrid); } catch (ex) { alert("警告:查询险种补退费合计出现异常! "); return; } }