/*************************************************************** *
ProName:EdorBIInput.js
*Title: 银行信息变更
*Description:银行信息变更
*Copyright:Copyright (c) 2012
*Company:Sinosoft
* @author : caiyc * @version : 8.0 * @date : 2014-06-17 ****************************************************************/ var showInfo; var turnPage = new turnPageClass(); var turnPage1 = new turnPageClass(); var turnPage2 = new turnPageClass(); var turnPage3 = new turnPageClass(); var mOperate = "";//操作状态 var tSQLInfo = new SqlClass(); var StringFlag; function initDivDisplay() { divEdorTypeDetail.style.display = ''; } function showFS(o) { if('0' == o){ if (document.all("FS2").checked = true) { document.all("FS2").checked = false; divFS.style.display = 'none'; } }else if('1' == o) { document.all("FS1").checked = false; var tUpRow = UpdateInsuredInfoGrid.getSelNo()-1; var tOldRow = OldInsuredInfoGrid.getSelNo()-1; if(tOldRow>-1&&StringFlag==0){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql3"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(document.all("HInsuredNo").value); turnPage3.queryModal(tSQLInfo.getString(), FSGrid, 1, 1); var arrRsult = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if(arrRsult != null){ document.all("MainInsuredNames").value = OldInsuredInfoGrid.getRowColData(tOldRow,2); document.all("MainInsuredIdNos").value = OldInsuredInfoGrid.getRowColData(tOldRow,8); } if(!turnPage3.strQueryResult){ i18nAlert("未查询到符合条件的附属被保险人!", "LIS-03009"); document.all("FS2").checked=false; return false; } }else if(tUpRow>-1&&StringFlag==1){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql4"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(document.all("InsuredNames").value); tSQLInfo.addSubPara(document.all("InsuredIdNos").value); turnPage3.queryModal(tSQLInfo.getString(), FSGrid, 1, 1); if(!turnPage3.strQueryResult){ i18nAlert("未查询到符合条件的附属被保险人!", "LIS-03009"); document.all("FS2").checked=false; return false; } } if (divFS.style.display == '') { divFS.style.display = 'none'; } else { divFS.style.display = ''; } } } /** * 选择城市前必须先选择省份 */ function checkProvince(){ if(document.all("BankProvince").value == ""){ i18nAlert("请先选择省份", "LIS-03010"); document.all("BankCity").value = ""; document.all("BankCityName").value = ""; } } function submitFunc(){ 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 insuredListCheck() { fm.Operate.value = "CHECKLIST"; tOperate = "CHECKLIST"; fm.action = "../API/grp_pa/g_pos/EdorInsuredDealSave/ADD?Operate="+ tOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID; ajaxSubmit2(document.getElementById("fm")); initForm(); } /** * 提交数据后返回操作 */ function afterSubmit(FlagStr, content) { if (typeof(showInfo)=="object" && typeof(showInfo)!="unknown") { 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); showInfo.focus(); queryOldClick(); queryUpClick(2); clearPage(); initFSGrid(); document.all("FS1").checked = false; document.all("FS2").checked = false; divFS.style.display='none'; } } /** *查询原被保险人信息 */ function queryOldClick(){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql1"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(document.all("OldInsuredName").value); tSQLInfo.addSubPara(document.all("OldInsuredIDNo").value); tSQLInfo.addSubPara(document.all("OldInsuredNo").value); tSQLInfo.addSubPara(tEdorAppNo); // initOldInsuredInfoGrid(); // initUpdateInsuredInfoGrid(); clearPage(); document.all("SerialNo").value=""; turnPage1.queryModal(tSQLInfo.getString(), OldInsuredInfoGrid, 1, 1); if(!turnPage1.strQueryResult){ i18nAlert("未查询到符合条件的查询结果!", "LIS-03011"); return false; } } /** *查询修改后被保人信息 */ function queryUpClick(o){ clearOldPage(); divButton01.style.display='none'; tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql2"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorType); tSQLInfo.addSubPara(NullToEmpty(tEdorNo)); tSQLInfo.addSubPara(document.all("InsuredName").value); tSQLInfo.addSubPara(document.all("InsuredIDNo").value); tSQLInfo.addSubPara(document.all("BatchNo").value); // initOldInsuredInfoGrid(); // initUpdateInsuredInfoGrid(); clearPage(); turnPage2.queryModal(tSQLInfo.getString(), UpdateInsuredInfoGrid, 1, 1); if(o=='1'){ if(!turnPage2.strQueryResult){ i18nAlert("未查询到符合条件的查询结果!", "LIS-03011"); return false; } } } /** *展示修改后被保险人银行 */ function showBankInfo(){ saveBankBtn.style.display=''; divButton01.style.display=''; StringFlag=0; var tRow = OldInsuredInfoGrid.getSelNo()-1; var tContNo = OldInsuredInfoGrid.getRowColData(tRow,1); var tInsuredNo = OldInsuredInfoGrid.getRowColData(tRow,12); var tName = OldInsuredInfoGrid.getRowColData(tRow,2); var tIDNo = OldInsuredInfoGrid.getRowColData(tRow,8); document.all("InsuredNames").value = tName; document.all("InsuredIdNos").value = tIDNo; document.all("HContNo").value = tContNo; document.all("HInsuredNo").value =tInsuredNo; document.all("HeadBankCode").value = OldInsuredInfoGrid.getRowColData(tRow,14); document.all("OldHeadBankCode").value = OldInsuredInfoGrid.getRowColData(tRow,14); document.all("HeadBankName").value = OldInsuredInfoGrid.getRowColData(tRow,15); document.all("OldHeadBankName").value = OldInsuredInfoGrid.getRowColData(tRow,15); document.all("AccName").value = OldInsuredInfoGrid.getRowColData(tRow,16); document.all("OldAccName").value = OldInsuredInfoGrid.getRowColData(tRow,16); document.all("BankAccNo").value = OldInsuredInfoGrid.getRowColData(tRow,17); document.all("OldBankAccNo").value = OldInsuredInfoGrid.getRowColData(tRow,17); document.all("BankProvince").value = OldInsuredInfoGrid.getRowColData(tRow,18); document.all("OldBankProvince").value = OldInsuredInfoGrid.getRowColData(tRow,18); document.all("BankProvinceName").value = OldInsuredInfoGrid.getRowColData(tRow,19); document.all("OldBankProvinceName").value = OldInsuredInfoGrid.getRowColData(tRow,19); document.all("BankCity").value = OldInsuredInfoGrid.getRowColData(tRow,20); document.all("OldBankCity").value = OldInsuredInfoGrid.getRowColData(tRow,20); document.all("BankCityName").value = OldInsuredInfoGrid.getRowColData(tRow,21); document.all("OldBankCityName").value = OldInsuredInfoGrid.getRowColData(tRow,21); // document.all("Mobile").value = OldInsuredInfoGrid.getRowColData(tRow,22); // document.all("OldMobile").value = OldInsuredInfoGrid.getRowColData(tRow,22); document.all("AccAttributes").value = OldInsuredInfoGrid.getRowColData(tRow, 23); document.all("OldAccAttributes").value = OldInsuredInfoGrid.getRowColData(tRow, 23); document.all("AccAttributesName").value = OldInsuredInfoGrid.getRowColData(tRow, 24); document.all("OldAccAttributesName").value = OldInsuredInfoGrid.getRowColData(tRow, 24); document.all("AccType").value = OldInsuredInfoGrid.getRowColData(tRow, 25); document.all("OldAccType").value = OldInsuredInfoGrid.getRowColData(tRow, 25); document.all("AccTypeName").value = OldInsuredInfoGrid.getRowColData(tRow, 26); document.all("OldAccTypeName").value = OldInsuredInfoGrid.getRowColData(tRow, 26); document.all("BankAccSub").value = OldInsuredInfoGrid.getRowColData(tRow, 27); document.all("OldBankAccSub").value = OldInsuredInfoGrid.getRowColData(tRow, 27); divFS.style.display='none'; document.all("FS2").checked=false; } //显示修改前银行信息 function showOlBankInfo(tName,tInsuredIDNO){ tSQLInfo0 = new SqlClass(); tSQLInfo0.setResourceName("g_pos.EdorBISql"); tSQLInfo0.setModule("grp_pa"); tSQLInfo0.setSqlId("EdorBISql10"); tSQLInfo0.addSubPara(tEdorAppNo); var upArrResul1= easyExecSql(tSQLInfo0.getString()); if (upArrResul1== null){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql9"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tName); tSQLInfo.addSubPara(tInsuredIDNO); var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1); }else { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql11"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tName); tSQLInfo.addSubPara(tInsuredIDNO); var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1); } if (tPropEntry==null) { return false; } else { document.all("OldHeadBankCode").value=tPropEntry[0][0]; document.all("OldHeadBankName").value=tPropEntry[0][1]; document.all("OldAccName").value=tPropEntry[0][2]; document.all("OldBankAccNo").value=tPropEntry[0][3]; document.all("OldBankProvince").value=tPropEntry[0][4]; document.all("OldBankProvinceName").value=tPropEntry[0][5]; document.all("OldBankCity").value=tPropEntry[0][6]; document.all("OldBankCityName").value=tPropEntry[0][7]; // document.all("OldMobile").value=tPropEntry[0][8]; // document.all("OldEdorValDate").value=tPropEntry[0][9];; document.all("OldAccAttributes").value=tPropEntry[0][9]; document.all("OldAccAttributesName").value=tPropEntry[0][10]; document.all("OldAccType").value=tPropEntry[0][11]; document.all("OldAccTypeName").value=tPropEntry[0][12]; document.all("OldBankAccSub").value=tPropEntry[0][13]; } // divFS.style.display='none'; // document.all("FS2").checked=false; } function showUpInfo(){ //保存按钮需要初始化没了,不能一直保存 saveBankBtn.style.display='none'; divButton01.style.display='none'; StringFlag=1; var tRow = UpdateInsuredInfoGrid.getSelNo()-1; var tSerialNo = UpdateInsuredInfoGrid.getRowColData(tRow,1); var tName = UpdateInsuredInfoGrid.getRowColData(tRow,2); var tInsuredIDNO = UpdateInsuredInfoGrid.getRowColData(tRow,3); document.all("InsuredNames").value = tName; document.all("InsuredIdNos").value = tInsuredIDNO; document.all("SerialNo").value = tSerialNo; tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorBISql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorBISql6"); tSQLInfo.addSubPara(tSerialNo); var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (tPropEntry==null) { return false; } else { document.all("HeadBankCode").value=tPropEntry[0][0]; document.all("HeadBankName").value=tPropEntry[0][1]; document.all("AccName").value=tPropEntry[0][2]; document.all("BankAccNo").value=tPropEntry[0][3]; document.all("BankProvince").value=tPropEntry[0][4]; document.all("BankProvinceName").value=tPropEntry[0][5]; document.all("BankCity").value=tPropEntry[0][6]; document.all("BankCityName").value=tPropEntry[0][7]; // document.all("Mobile").value=tPropEntry[0][8]; //document.all("EdorValDate").value=tPropEntry[0][9]; document.all("AccAttributes").value=tPropEntry[0][10]; document.all("AccAttributesName").value=tPropEntry[0][11]; document.all("AccType").value=tPropEntry[0][12]; document.all("AccTypeName").value=tPropEntry[0][13]; document.all("BankAccSub").value=tPropEntry[0][14]; } divFS.style.display='none'; document.all("FS2").checked=false; showOlBankInfo(tName,tInsuredIDNO); } /** * 保存 */ function saveBank(){ var tOldRow = OldInsuredInfoGrid.getSelNo(); var tUPRow = UpdateInsuredInfoGrid.getSelNo(); if(tOldRow=='0' && tUPRow=='0'){ i18nAlert("请选择一条被保人信息进行操作!", "LIS-03012"); return false; } if(!/^[\u4e00-\u9fa5a-zA-Z\s\-]{0,50}$/.test(document.all("AccName").value)){ i18nAlert("开户名存在非法字符!", null); return false; } if(document.all("FS2").checked){ var rowNum = FSGrid.mulLineCount ; var tRow = 0; for(var index=0;index