/*************************************************************** *

ProName:EdorXTInput.js

*

Title:整单退保

*

Description:整单退保

*

Copyright:Copyright (c) 2012

*

Company:Sinosoft

* @author : 蔡云聪 * @version : 8.0 * @date : 2014-06-26 ****************************************************************/ var showInfo; var turnPage = new turnPageClass(); var turnPage1 = new turnPageClass(); var turnPage2 = new turnPageClass(); var mOperate = "";//操作状态 var tSQLInfo = new SqlClass(); //整单退保被保险人查询 function queryClick(){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorXTSql1"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tEdorNo); tSQLInfo.addSubPara(tEdorType); tSQLInfo.addSubPara(document.all("InsuredName").value); tSQLInfo.addSubPara(document.all("InsuredIDNo").value); tSQLInfo.addSubPara(document.all("InsuredNo").value); turnPage1.queryModal(tSQLInfo.getString(), UpdateInsuredInfoGrid, 1, 1); if(!turnPage1.strQueryResult){ i18nAlert("未查询到符合条件的查询结果!", "LIS-03011"); return false; } } //显示应退金额 function showGetJsMoney( flag){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorXTSql4"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorNo); var getMoney = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (getMoney==null) { }else{ // if("0"==flag){ // document.all("GetjsMoney").value = getMoney[0][0]; // document.all("GetjaMoney").value = getMoney[0][0]; // } // // if("1"==flag){ // document.all("GetjsMoney").value = getMoney[0][0]; // } document.all("GetjsMoney").value = getMoney[0][0]; } tSQLInfo1 = new SqlClass(); tSQLInfo1.setResourceName("g_pos.EdorXTSql"); tSQLInfo1.setModule("grp_pa"); tSQLInfo1.setSqlId("EdorXTSql5"); tSQLInfo1.addSubPara(tEdorAppNo); tSQLInfo1.addSubPara(tEdorNo); var getMoney1 = easyExecSql(tSQLInfo1.getString(), 1, 0, 1); if (getMoney==null) { }else{ document.all("GetjaMoney").value =getMoney1[0][0]; // 后台查出数据,然后在前端界面展示多位小数,前端处理方法 fxl // document.all("GetjaMoney").value = Number(getMoney1[0][0]).toFixed(2); } } function initCheckClaim() { tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorXTSql6"); tSQLInfo.addSubPara(tEdorNo); tSQLInfo.addSubPara(tEdorType); tSQLInfo.addSubPara(tGrpContNo); var arrResult2 = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (arrResult2==null) { }else{ document.all("CheckClaim").checked = true; } } //保存信息 function saveClick(){ if(!verifyForm("fm")){ return false; } if(document.all("BackType").value=='22' && document.all("BackCal").value=="" ){ i18nAlert("退费金额需要大于等于0", "LIS-BQ-0004"); return false; } mOperate="SAVE"; fm.action="../API/grp_pa/g_pos/EdorXTSave/SAVE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&Edorcodetype="+tEdorcodetype+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo; submitFunc(); ajaxSubmit2(document.getElementById("fm")); showGetJsMoney(0); } 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 returnbak() { top.opener.initForm(); top.close(); } function saveGetMoney(){ if(document.all("GetjsMoney").value<0){ i18nAlert("退费金额需要大于等于0", "LIS-BQ-0004"); return false; } tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setSqlId("EdorXTSql7"); tSQLInfo.setModule("grp_pa"); tSQLInfo.addSubPara(tGrpContNo); var prem = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (prem != null && prem !=""){ if (document.all("GetjsMoney").value-prem>0){ i18nAlert("实退保金额不能超过保费"); return false; } } mOperate="CHANGE"; fm.action="../API/grp_pa/g_pos/EdorXTSave/CHANGE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&Edorcodetype="+tEdorcodetype+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo; submitFunc(); ajaxSubmit2(document.getElementById("fm")); showGetJsMoney(); } /** * 提交数据后返回操作 */ 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(); QueryReson(); } } function afterCodeSelect(o, p) { if(o=='queryexp') { if(p.value=='41') { divCalName.style.display = "none"; divCalCode.style.display = "none"; } else if(p.value=='42'){ divCalName.style.display = ""; divCalCode.style.display = ""; } } } /** * 查询退保原因 **/ function QueryReson(){ tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorXTSql2"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorNo); tSQLInfo.addSubPara(tEdorType); tSQLInfo.addSubPara(tGrpContNo); var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (arrResult==null) { }else{ document.all("ReasonDesc").value = arrResult[0][0]; document.all("BackType").value = arrResult[0][1]; document.all("BackTypeName").value = arrResult[0][2]; } tSQLInfo = new SqlClass(); tSQLInfo.setResourceName("g_pos.EdorXTSql"); tSQLInfo.setModule("grp_pa"); tSQLInfo.setSqlId("EdorXTSql3"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tEdorType); var arrResult2 = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (arrResult2==null) { }else{ document.all("BackCal").value = arrResult2[0][0]; document.all("BackCalName").value = arrResult2[0][1]; } }