/***************************************************************
*
ProName:EdorRNInput.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 turnPage3 = new turnPageClass();
var turnPage4 = new turnPageClass();
var mOperate = "";//操作状态
var tSQLInfo = new SqlClass();
//原被保险人信息查询
function queryOldClick(){
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_pa");
tSQLInfo.setResourceName("g_pos.EdorRNSql");
tSQLInfo.setSqlId("EdorRNSql1");
tSQLInfo.addSubPara(tGrpContNo);
tSQLInfo.addSubPara(fm.OldInsuredName.value);
tSQLInfo.addSubPara(fm.OldInsuredIDNo.value);
tSQLInfo.addSubPara(fm.OldInsuredNo.value);
tSQLInfo.addSubPara(tEdorAppNo);
turnPage1.queryModal(tSQLInfo.getString(), OldInsuredInfoGrid, 1, 1);
if(!turnPage1.strQueryResult){
i18nAlert("未查询到符合条件的查询结果!", "LIS-03011");
return false;
}
}
//修改过的被保险人信息查询
function queryUpClick(o){
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_pa");
tSQLInfo.setResourceName("g_pos.EdorRNSql");
tSQLInfo.setSqlId("EdorRNSql2");
tSQLInfo.addSubPara(tGrpContNo);
tSQLInfo.addSubPara(tEdorAppNo);
tSQLInfo.addSubPara(tEdorType);
tSQLInfo.addSubPara(NullToEmpty(tEdorNo));
tSQLInfo.addSubPara(fm.InsuredName.value);
tSQLInfo.addSubPara(fm.InsuredIDNo.value);
tSQLInfo.addSubPara(fm.BatchNo.value);
turnPage2.queryModal(tSQLInfo.getString(), UpdateInsuredInfoGrid, 1, 1);
if(o=='1'){
if(!turnPage2.strQueryResult){
i18nAlert("未查询到符合条件的查询结果!", "LIS-03011");
return false;
}
}
}
//选择操作
function selectClick(){
var rowNum = OldInsuredInfoGrid.mulLineCount ;
var tRow = 0;
for (var index=0;index0) {
divInvest.style.display = "";
} else {
divInvest.style.display = "none";
}
}
/**
* 缴费信息保存
**/
function payPlanSave(){
var tInsuredListSelNo= UpdateInsuredInfoGrid.getSelNo();
if (tInsuredListSelNo==0) {
i18nAlert("请选择一条被保险人信息!", "LIS-03031");
return false;
}
fm.InsuredID.value = UpdateInsuredInfoGrid.getRowColData(tInsuredListSelNo-1,3);
var flag = false;
var lockCount=PayPlanGrid.mulLineCount ;
for(var i = 0;i=1){
i18nAlert("当期管理费标准需要录入大于等于0小于1的数字!", "");
return false;
}
var regex = /^(0(\.\d{1,4})?|1(\.0{1,4})?)$/;
if (!regex.test(tFeeRate)) {
alert("当期管理费标准需要录入最多四位小数!");
return false;
}
var tPayPlanPrem=PayPlanGrid.getRowColData(i, 10);
if (tPayPlanPrem =="") {
i18nAlert("本次缴费金额不能为空!", "");
return false;
}
if (!isNumeric(tPayPlanPrem)) {
i18nAlert("本次缴费金额需要录入大于等于0的数字!", "");
return false;
}
if (tPayPlanPrem<0) {
i18nAlert("本次缴费金额需要录入大于等于0的数字!", "");
return false;
}
if (tPayPlanPrem.includes('.')) {
// 如果包含小数点,则必须是两位小数
var regex = /^\d+(\.\d{2})$/;
if (!regex.test(tPayPlanPrem)) {
alert("本次缴费金额需要录入精确到两位小数!");
return false;
}
}
}
}
if(!flag){
i18nAlert("请选择一条缴费项信息!", "LIS-03030");
return false;
}
mOperate = "PayPlanSave";
fm.action = "../API/grp_pa/g_pos/EdorRNSave/PayPlanSave?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
submitFunc();
}
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();
//fm.submit();
ajaxSubmit2(document.getElementById("fm"));
}
/**
* 提交数据后返回操作
*/
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();
}
divPayPlan.style.display = "none";
divInvest.style.display = "none";
queryOldClick();
queryUpClick(2);
}