You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1893 lines
52 KiB
1893 lines
52 KiB
/***************************************************************
|
|
* <p>ProName:EdorNIInput.js</p>
|
|
* <p>Title:新增被保险人</p>
|
|
* <p>Description:新增被保险人</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : weigh
|
|
* @version : 8.0
|
|
* @date : 2014-06-11
|
|
****************************************************************/
|
|
|
|
var showInfo;
|
|
var turnPage = new turnPageClass();
|
|
var turnPage1 = new turnPageClass();
|
|
var turnPage2 = new turnPageClass();
|
|
var turnPage3 = new turnPageClass();
|
|
var turnPage4 = new turnPageClass();
|
|
var turnPage5 = new turnPageClass();
|
|
var turnPage6 = new turnPageClass();
|
|
var mOperate = "";//操作状态
|
|
var tSQLInfo = new SqlClass();
|
|
var tQuerFlag;
|
|
|
|
/**
|
|
* 提交数据后返回操作
|
|
*/
|
|
function afterSubmit(tFlagStr, tContent, tInsuredid) {
|
|
|
|
if (typeof(showInfo) == "object" && typeof(showInfo) != "unknown") {
|
|
|
|
showInfo.close();
|
|
}
|
|
|
|
if (tFlagStr == "Fail") {
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(tContent);
|
|
//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(tContent);
|
|
//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();
|
|
|
|
if(mOperate == "INSERT"|| mOperate == "CHOSEDEL" || mOperate == "CONDDEL" || mOperate == "ALLDEL"){
|
|
document.all("InsuredType").disabled=false;
|
|
clearPage();
|
|
queryInsured(2);
|
|
initBnfGrid();
|
|
initAmntGrid();
|
|
initPayPlanGrid();
|
|
initInvestGrid();
|
|
initQueryInfoGrid();
|
|
divQuerySpe.style.display="none";
|
|
divQueryShow.style.display="none";
|
|
divPayPlan.style.display ="none";
|
|
divInvest.style.display ="none";
|
|
}else if(mOperate == "UPDATE"){
|
|
clearPage();
|
|
initQueryInfoGrid();
|
|
initBnfGrid();
|
|
//queryBnf(tInsuredid);
|
|
queryInsured(2);
|
|
initAmntGrid();
|
|
initPayPlanGrid();
|
|
initInvestGrid();
|
|
divQueryShow.style.display="none";
|
|
shownewPage.style.display="none";
|
|
divQueryPage.style.display="";
|
|
divQuerybnf.style.display="";
|
|
divQuerySpe.style.display="none";
|
|
divPayPlan.style.display ="none";
|
|
divInvest.style.display ="none";
|
|
} else if(mOperate == "PayPlanSave"){
|
|
queryPayPlan();
|
|
} else if(mOperate == "InvestSave"){
|
|
queryPayPlan();
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 提交
|
|
*/
|
|
function submitForm() {
|
|
|
|
var i = 0;
|
|
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.Operate.value = mOperate;
|
|
// fm.submit();
|
|
ajaxSubmit2(document.getElementById("fm"), resultAfterSubmit);
|
|
|
|
}
|
|
|
|
function resultAfterSubmit(flagStr,content,result){//返回方法应有三个参数分别为(String,String,result)类型
|
|
afterSubmit(flagStr,content,result.Insuredid);
|
|
}
|
|
|
|
/**
|
|
* 查询
|
|
**/
|
|
function queryInsured(o){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql6");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.InsuredNameQ.value);
|
|
tSQLInfo.addSubPara(fm.IdNoQ.value);
|
|
tSQLInfo.addSubPara(fm.InsuredNoQ.value);
|
|
tSQLInfo.addSubPara(fm.PlanCodeQ.value);
|
|
tSQLInfo.addSubPara(fm.ImpBatch.value);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.addSubPara(NullToEmpty(fm.EdorNo.value));
|
|
tSQLInfo.addSubPara("");
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
initEdorDetailGrid();
|
|
clearPage();
|
|
initBnfGrid();
|
|
initAmntGrid();
|
|
initPayPlanGrid();
|
|
initInvestGrid();
|
|
|
|
turnPage1.queryModal(tSQLInfo.getString(), EdorDetailGrid, 1, 1);
|
|
divQueryShow.style.display ="none";
|
|
divQuerySpe.style.display = "none";
|
|
divPayPlan.style.display ="none";
|
|
divInvest.style.display ="none";
|
|
|
|
if(o=='1'){
|
|
if (!turnPage1.strQueryResult) {
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* 人员清单校验
|
|
*/
|
|
function insuredListCheck() {
|
|
|
|
fm.Operate.value = "CHECKLIST";
|
|
tOperate = "CHECKLIST";
|
|
|
|
fm.action = "../API/grp_pa/g_pos/EdorInsuredDealSave/ADD";
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
initForm();
|
|
fm.action="../API/grp_pa/g_pos/EdorNISave/ADD";
|
|
}
|
|
|
|
/**
|
|
* 选择删除
|
|
*/
|
|
function choseDelet(){
|
|
|
|
var tSelNo = EdorDetailGrid.getSelNo();
|
|
if(tSelNo=='0'){
|
|
i18nAlert("请选择一条被保人信息进行删除!", "LIS-03502");
|
|
return false;
|
|
}
|
|
|
|
mOperate = "CHOSEDEL";
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/CHOSEDEL";
|
|
submitForm();
|
|
}
|
|
|
|
/**
|
|
* 条件删除
|
|
*/
|
|
function condDelete(){
|
|
|
|
if(fm.InsuredNameQ.value =="" && fm.IdNoQ.value=="" && fm.InsuredNoQ.value=="" && fm.PlanCodeQ.value=="" && fm.ImpBatch.value==""){
|
|
i18nAlert("请至少录入一个查询条件进行条件删除操作!", "LIS-03503");
|
|
return false;
|
|
}
|
|
|
|
var tCount = EdorDetailGrid.mulLineCount;
|
|
if(tCount =='0'){
|
|
i18nAlert("没有需要进行【条件删除】的数据!", "LIS-03504");
|
|
return false;
|
|
}
|
|
|
|
mOperate = "CONDDEL";
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/CONDDEL";
|
|
submitForm();
|
|
|
|
}
|
|
|
|
/**
|
|
* 全部删除
|
|
*/
|
|
function allDelete(){
|
|
|
|
if(!i18nConfirm("是否确定执行全部删除操作?", "LIS-00695")){
|
|
return false;
|
|
}
|
|
|
|
mOperate = "ALLDEL";
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/ALLDEL";
|
|
submitForm();
|
|
}
|
|
|
|
|
|
/**
|
|
* 新增
|
|
*/
|
|
function addRecord() {
|
|
|
|
|
|
|
|
mOperate = "INSERT";
|
|
if (!beforeSubmit()) {
|
|
return false;
|
|
}
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/ADD";
|
|
submitForm();
|
|
}
|
|
|
|
/**
|
|
* 修改
|
|
*/
|
|
function modifyRecord() {
|
|
|
|
var tSelNo = EdorDetailGrid.getSelNo();
|
|
if(tSelNo=='0'){
|
|
i18nAlert("请选择一条被保人信息进行修改!", "LIS-03505");
|
|
return false;
|
|
}
|
|
|
|
mOperate = "UPDATE";
|
|
if (!beforeSubmit()) {
|
|
return false;
|
|
}
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/UPDATE";
|
|
submitForm();
|
|
}
|
|
/**
|
|
* 清空 市 和 区/县
|
|
*/
|
|
function clearCityAndCounty(){
|
|
document.all("CityName").value = "";
|
|
document.all("CityCode").value = "";
|
|
document.all("CountyName").value = "";
|
|
document.all("CountyCode").value = "";
|
|
}
|
|
/**
|
|
* 清空 区/县
|
|
*/
|
|
function clearCounty(){
|
|
document.all("CountyName").value = "";
|
|
document.all("CountyCode").value = "";
|
|
}
|
|
|
|
/**
|
|
* 修改缴费项信息
|
|
*/
|
|
function payPlanSave(){
|
|
|
|
var tSelNo = PayPlanGrid.getSelNo();
|
|
if (tSelNo==0) {
|
|
i18nAlert("请选择一条缴费项信息!", "LIS-03030");
|
|
return false;
|
|
}
|
|
|
|
var tBatchNo = PayPlanGrid.getRowColData(tSelNo-1, 1);
|
|
var tInsuredID = PayPlanGrid.getRowColData(tSelNo-1, 2);
|
|
var tPayPlanID = PayPlanGrid.getRowColData(tSelNo-1, 3);
|
|
var tPayPlanPrem = PayPlanGrid.getRowColData(tSelNo-1, 8);
|
|
|
|
if (tPayPlanPrem =="") {
|
|
i18nAlert("缴费金额不能为空!", "LIS-03353");
|
|
return false;
|
|
}
|
|
|
|
if (!isNumeric(tPayPlanPrem)) {
|
|
i18nAlert("第【{0}】行的缴费金额需要录入大于等于0的数字!", "LIS-03660", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tPayPlanPrem<0) {
|
|
i18nAlert("第【{0}】行的缴费金额需要录入大于等于0的数字!", "LIS-03660", (i+1));
|
|
return false;
|
|
}
|
|
|
|
mOperate = "PayPlanSave";
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/PayPlanSave";
|
|
submitForm();
|
|
}
|
|
|
|
/**
|
|
* 修改投资信息
|
|
*/
|
|
function investSave(){
|
|
|
|
var tSelNo = PayPlanGrid.getSelNo();
|
|
if (tSelNo==0) {
|
|
i18nAlert("请选择一条缴费项信息!", "LIS-03030");
|
|
return false;
|
|
}
|
|
|
|
var tPayPlanPrem = PayPlanGrid.getRowColData(tSelNo-1, 8);
|
|
|
|
var tCount = InvestGrid.mulLineCount;
|
|
if (tCount==0) {
|
|
i18nAlert("没有需要修改的投资账户信息!", "LIS-03661");
|
|
return false;
|
|
}
|
|
|
|
var tInvestMoneyFlag = false;//投资金额录入标志
|
|
var tInvestRateFlag = false;//投资分配比例录入标志
|
|
var tSumInvestMoney = 0;
|
|
var tSumInvestRate = 0;
|
|
for (var i=0;i < InvestGrid.mulLineCount;i++) {
|
|
|
|
var tInvestMoney = InvestGrid.getRowColData(i,6);
|
|
var tInvestRate = InvestGrid.getRowColData(i,7);
|
|
|
|
if (tInvestMoney=="" && tInvestRate=="") {
|
|
i18nAlert("第【{0}】行投资金额与投资分配比例不能同时为空!", "LIS-03473", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tInvestMoney!="" && tInvestRate!="") {
|
|
i18nAlert("第【{0}】行投资金额与投资分配比例不能同时录入!", "LIS-03474", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tInvestMoney!="") {
|
|
|
|
tInvestMoneyFlag = true;
|
|
|
|
if (!isNumeric(tInvestMoney)) {
|
|
i18nAlert("第【{0}】行的投资金额需要录入大于等于0的数字!", "LIS-03475", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tInvestMoney<0) {
|
|
i18nAlert("第【{0}】行的投资金额需要录入大于等于0的数字!", "LIS-03475", (i+1));
|
|
return false;
|
|
}
|
|
|
|
tSumInvestMoney = tSumInvestMoney + parseFloat(tInvestMoney);
|
|
}
|
|
|
|
if (tInvestRate!="") {
|
|
|
|
tInvestRateFlag = true;
|
|
|
|
if (!isNumeric(tInvestRate)) {
|
|
i18nAlert("第【{0}】行的投资分配比例需要录入0-1之间的小数!", "LIS-03476", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tInvestRate>1 || tInvestRate<0) {
|
|
i18nAlert("第【{0}】行的投资分配比例需要录入0-1之间的小数!", "LIS-03476", (i+1));
|
|
return false;
|
|
}
|
|
|
|
tSumInvestRate = tSumInvestRate + parseFloat(tInvestRate);
|
|
}
|
|
}
|
|
|
|
if (tInvestMoneyFlag && tInvestRateFlag) {
|
|
i18nAlert("投资金额与投资分配比例不能同时录入!", "LIS-03477");
|
|
return false;
|
|
}
|
|
|
|
if (tInvestMoneyFlag && tSumInvestMoney!=tPayPlanPrem) {
|
|
i18nAlert("投资金额总和需要与缴费金额相等!", "LIS-03478");
|
|
return false;
|
|
}
|
|
|
|
if (tInvestRateFlag && tSumInvestRate!=1) {
|
|
i18nAlert("投资分配比例之和不等于1!", "LIS-03479");
|
|
return false;
|
|
}
|
|
|
|
mOperate = "InvestSave";
|
|
fm.action = "../API/grp_pa/g_pos/EdorNISave/InvestSave";
|
|
submitForm();
|
|
}
|
|
|
|
/**
|
|
* 根据前台页面进行下拉控制
|
|
**/
|
|
function returnShowCodeList (value1, value2, value3) {
|
|
|
|
if (value1=='bankprovince') {
|
|
|
|
return showCodeList('province',value2,value3,null,null,null,'1',180);
|
|
|
|
} else if (value1=='bankcity') {
|
|
if (isEmpty(fm.BankProvince)) {
|
|
i18nAlert("请选择省!", "LIS-00795");
|
|
return false;
|
|
}
|
|
var tProvince = fm.BankProvince.value;
|
|
|
|
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
|
|
} else if (value1=='city') {
|
|
if (isEmpty(fm.ProvinceName)) {
|
|
i18nAlert("请选择省!", "LIS-00795");
|
|
return false;
|
|
}
|
|
var tProvince = fm.ProvinceCode.value;
|
|
|
|
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
|
|
} else if (value1=='district') {
|
|
|
|
if (isEmpty(fm.ProvinceName)) {
|
|
i18nAlert("请选择省!", "LIS-00795");
|
|
return false;
|
|
}
|
|
|
|
if (isEmpty(fm.CityName)) {
|
|
i18nAlert("请选择市!", "LIS-00796");
|
|
return false;
|
|
}
|
|
|
|
var tCity = fm.CityCode.value;
|
|
|
|
return showCodeList('district',value2,value3,null,tCity,'UpPlaceName','1',180);
|
|
}
|
|
}
|
|
|
|
function returnShowCodeLisKey (value1, value2, value3) {
|
|
|
|
if (value1=='city') {
|
|
|
|
if (isEmpty(fm2.ProvinceName)) {
|
|
i18nAlert("请选择省!", "LIS-00795");
|
|
return false;
|
|
}
|
|
|
|
var tProvince = fm.ProvinceCode.value;
|
|
|
|
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
|
|
} else if (value1=='district') {
|
|
|
|
if (isEmpty(fm.ProvinceName)) {
|
|
i18nAlert("请选择省!", "LIS-00795");
|
|
return false;
|
|
}
|
|
|
|
if (isEmpty(fm.CityName)) {
|
|
i18nAlert("请选择市!", "LIS-00796");
|
|
return false;
|
|
}
|
|
|
|
var tCity = fm.CityCode.value;
|
|
|
|
return showCodeList('district',value2,value3,null,tCity,'UpPlaceName','1',180);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 下拉框选择后处理
|
|
*/
|
|
function afterCodeSelect(tSelectValue, tObj) {
|
|
|
|
if(tSelectValue=='bnftype1'){
|
|
if(tObj.value == "指定受益人"){
|
|
var rowNumber = BnfGrid.lastFocusRowNo;
|
|
BnfGrid.setRowColData(rowNumber, 14, "1");
|
|
}
|
|
}
|
|
if(tSelectValue=='relation'){
|
|
if (fm.relatomain.value!='00') {
|
|
mainname.style.display="";
|
|
mainname1.style.display="";
|
|
mainIDNo.style.display="";
|
|
mainCustNo1.style.display="";
|
|
id1.style.display="none";
|
|
id2.style.display="none";
|
|
id3.style.display="none";
|
|
id4.style.display="none";
|
|
|
|
}else{
|
|
mainname.style.display="none";
|
|
mainname1.style.display="none";
|
|
mainIDNo.style.display="none";
|
|
mainCustNo1.style.display="none";
|
|
id1.style.display="";
|
|
id2.style.display="";
|
|
id3.style.display="";
|
|
id4.style.display="";
|
|
}
|
|
}else if(fm.InsuredType.value=='1'){
|
|
shownewPage.style.display="";
|
|
divQueryPage.style.display="none";
|
|
divQuerybnf.style.display="none";
|
|
}else{
|
|
shownewPage.style.display="none";
|
|
divQueryPage.style.display="";
|
|
divQuerybnf.style.display="";
|
|
}
|
|
|
|
if(tSelectValue=='contplan'){
|
|
initAmntGrid();
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql12");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.ContPlanCode.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrRsult= easyExecSql(tSQLInfo.getString());
|
|
if(arrRsult!=null){
|
|
fm.AmntFlag.value = "ShowAmnt";
|
|
divQueryShow.style.display="";
|
|
|
|
turnPage4.queryModal(tSQLInfo.getString(), AmntGrid, 1,1,30);
|
|
}else {
|
|
fm.AmntFlag.value = "";
|
|
divQueryShow.style.display="none";
|
|
}
|
|
|
|
if(fm.relatomain.value!='00'){
|
|
|
|
if(fm.mainCustName.value==""){
|
|
i18nAlert("请先录入主被保险人信息!", "LIS-03506");
|
|
return false;
|
|
}
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql15");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.mainCustName.value);
|
|
tSQLInfo.addSubPara(fm.mainCustIDNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrResulter = easyExecSql(tSQLInfo.getString());
|
|
if(arrResulter !=null){
|
|
if(fm.ContPlanCode.value != arrResulter[0][0]){
|
|
i18nAlert("被保险人的主被保人方案属于【主附属共保方案】方案编码为【{0}】", "LIS-03507", arrResulter[0][0]);
|
|
fm.ContPlanCode.value="";
|
|
fm.ContPlanCodeName.value="";
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(tSelectValue == "province"){
|
|
if(tObj.name=="BankProvince"){
|
|
fm.BankCity.value="";
|
|
fm.BankCityName.value="";
|
|
}else {
|
|
|
|
fm.CityName.value="";
|
|
fm.CityCode.value="";
|
|
fm.CountyName.value="";
|
|
fm.CountyCode.value="";
|
|
}
|
|
} else if(tSelectValue == "city"){
|
|
|
|
if(tObj.name=="BankCity"){
|
|
|
|
}else {
|
|
fm.CountyName.value="";
|
|
fm.CountyCode.value="";
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* 校验身份证以及返回出生日期和性别、年龄
|
|
*/
|
|
function checkidtype(){
|
|
|
|
if(fm.IDNo.value.length>0 && fm.IDType.value=="") {
|
|
i18nAlert("请先选择证件类型!", "LIS-00574");
|
|
return false;
|
|
}
|
|
|
|
if(fm.IDType.value=="0"&&fm.IDNo.value.length>0) {
|
|
|
|
if((fm.IDNo.value.length!=18)){
|
|
i18nAlert("输入的身份证号位数错误", "LIS-00575");
|
|
document.all('IDNo').className = "warn";
|
|
// document.all('IDNo').value="";
|
|
return false;
|
|
}
|
|
if(!checkIdCard(fm.IDNo.value)) {
|
|
// document.all('IDNo').value="";
|
|
document.all('IDNo').className = "warn";
|
|
return false;
|
|
}else {
|
|
fm.InsuredBirthDay.value =getBirthdatByIdNo(fm.IDNo.value);
|
|
fm.InsuredGender.value = getSexByIDNo(fm.IDNo.value);
|
|
|
|
if(fm.InsuredGender.value=='0'){
|
|
fm.InsuredGenderName.value ='男';
|
|
}else if(fm.InsuredGender.value=='1'){
|
|
fm.InsuredGenderName.value ='女';
|
|
}
|
|
fm.InsuredAppAge.value = calAge(fm.InsuredBirthDay.value);
|
|
document.all('IDNo').className = "common";
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 选择城市前必须先选择省份
|
|
*/
|
|
function checkProvince(){
|
|
|
|
if(fm.Province.value == ""){
|
|
i18nAlert("请先选择省份", "LIS-03010");
|
|
fm.City.value = "";
|
|
fm.CityName.value = "";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 清空关联查询的项目
|
|
*/
|
|
function clearInput(codeInput,nameInput) {
|
|
codeInput.value = "";
|
|
nameInput.value = "";
|
|
}
|
|
|
|
/**
|
|
* 查询方案信息
|
|
*/
|
|
function showContPlanCode(cObj,cObjName,cObjCode){
|
|
return showCodeList('contplan',[cObj,cObjName,cObjCode],[0,1,2],null,[document.all('GrpPropNo').value,'GrpContNoEQ'],['GrpContNo','GrpContNoEQ'],1,null);
|
|
}
|
|
|
|
function showContPlanCodeName(cObj,cObjName,cObjCode){
|
|
return showCodeListKey('contplan',[cObj,cObjName,cObjCode],[0,1,2],null,[document.all('GrpPropNo').value,'GrpContNoEQ'],['GrpContNo','GrpContNoEQ'],1,null);
|
|
}
|
|
|
|
//初始化职级的下拉内容
|
|
function initPosition(cObj,cName){
|
|
showCodeList('position',[cObj,cName], [0,1], null,document.all('GrpPropNo').value,'GrpContNo', 1,null);
|
|
}
|
|
|
|
|
|
// //职业类别
|
|
// function showOccupationCodeList(obj1,obj1Name,obj2,obj2Name){
|
|
// var keycode = event.keyCode;
|
|
// //回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
// showCodeList('occupationcode',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCodeName.value,'OccupationName',1);
|
|
// }
|
|
//
|
|
// function showOccupationCodeListKey(obj1,obj1Name,obj2,obj2Name){
|
|
// var keycode = event.keyCode;
|
|
// //回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
// showCodeList('occupationcode',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCodeName.value,'OccupationName',1);
|
|
// }
|
|
|
|
//职业类别
|
|
function showOccupationNameList(obj1,obj1Name,obj2,obj2Name){
|
|
var keycode = event.keyCode;
|
|
//回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
showCodeList('occupationcode2',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCodeName.value,'OccupationName',1);
|
|
}
|
|
|
|
function showOccupationNameListKey(obj1,obj1Name,obj2,obj2Name){
|
|
var keycode = event.keyCode;
|
|
//回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
showCodeList('occupationcode2',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCodeName.value,'OccupationName',1);
|
|
}
|
|
|
|
|
|
//职业类别
|
|
function showOccupationCodeList(obj1,obj1Name,obj2,obj2Name){
|
|
var keycode = event.keyCode;
|
|
//回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
showCodeList('occupationcode2',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCode.value,'OccupationCode',1);
|
|
}
|
|
|
|
function showOccupationCodeListKey(obj1,obj1Name,obj2,obj2Name){
|
|
var keycode = event.keyCode;
|
|
//回车的ascii码是13
|
|
// if(keycode!="13" && keycode!="9") {
|
|
// return;
|
|
// }
|
|
showCodeList('occupationcode2',[obj1,obj1Name,obj2,obj2Name],[0,1,2,3],null,fm.OccupationCode.value,'OccupationCode',1);
|
|
}
|
|
|
|
/**
|
|
* 选择主客户 --按回车键和Tab键时触发
|
|
*/
|
|
function selectMainUser() {
|
|
|
|
var keyCode = event.keyCode;
|
|
if (keyCode=="13"|| keyCode=="9") {
|
|
if (!selectMainUserInfo()) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 选择主客户详细方法
|
|
*/
|
|
|
|
function selectMainUserInfo(){
|
|
fm.mainCustNameTemp.value = fm.mainCustName.value;
|
|
if(fm.mainCustNameTemp.value != fm.mainCustName.value.trim()){
|
|
i18nAlert("录入主被保人姓名不能带空格!", "LIS-03508");
|
|
return false;
|
|
}
|
|
|
|
if(fm.mainCustName.value !=null && fm.mainCustName.value !=''){
|
|
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql4");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.mainCustName.value);
|
|
tSQLInfo.addSubPara(fm.mainCustIDNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
arrResult = easyExecSql(tSQLInfo.getString());
|
|
if(arrResult=='0'){
|
|
i18nAlert("没有查询到主被保人,同时增【主附被保险人】的话请使用导入模板!", "LIS-03509");
|
|
fm.mainInsuredNo.value="";
|
|
fm.mainCustName.value="";
|
|
fm.mainIDNo.value="";
|
|
return false;
|
|
}
|
|
|
|
var n=arrResult[0];
|
|
if (n>1) {
|
|
showMainLCInsuredInfo();//主被保人查询
|
|
fm.mainInsuredNo.value="";
|
|
fm.mainCustName.value="";
|
|
fm.mainCustIDNo.value="";
|
|
|
|
}else if(n==1){
|
|
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql7");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.mainCustName.value);
|
|
tSQLInfo.addSubPara(fm.mainCustIDNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
fm.mainInsuredNo.value="";
|
|
fm.mainCustName.value="";
|
|
fm.mainCustIDNo.value="";
|
|
arrResult = new Array();
|
|
arrResult = easyExecSql(tSQLInfo.getString());
|
|
fm.mainInsuredNo.value = arrResult[0][1];
|
|
fm.mainCustName.value= arrResult[0][2];
|
|
fm.mainCustIDNo.value= arrResult[0][3];
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 检查主被保人信息
|
|
*/
|
|
function checkMain(){
|
|
if(fm.relatomain.value !='00'){
|
|
|
|
if(fm.mainCustName.value==''){
|
|
i18nAlert("请先录入主被保险人姓名!", "LIS-03510");
|
|
fm.InsuredName.value="";
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 选择客户 --按回车键和Tab键时触发
|
|
*/
|
|
function selectUser() {
|
|
|
|
var keyCode = event.keyCode;
|
|
if (keyCode=="13"|| keyCode=="9") {
|
|
if (!selectUserInfo()) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 选择客户详细方法
|
|
*/
|
|
function selectUserInfo() {
|
|
|
|
fm.InsuredNameTemp.value = fm.InsuredName.value;
|
|
if (fm.InsuredNameTemp.value != fm.InsuredName.value.trim()) {
|
|
i18nAlert("录入被保人姓名不能带空格!", "LIS-03351");
|
|
return false;
|
|
}
|
|
if (fm.InsuredName.value!=null && fm.InsuredName.value!='') {
|
|
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql3");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.InsuredName.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
arrResult = easyExecSql(tSQLInfo.getString());
|
|
if(arrResult==0){
|
|
emptyCustInfo();
|
|
return ;
|
|
}
|
|
|
|
var n=arrResult[0];
|
|
if (n>1) {
|
|
showLCInsuredInfo();//客户查询
|
|
emptyCustInfo();//清空被保人客户页面信息
|
|
} else if(n==1) {
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql5");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.InsuredName.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
emptyCustInfo();
|
|
arrResult = new Array();
|
|
arrResult = easyExecSql(tSQLInfo.getString());
|
|
fm.InsuredName.value = arrResult[0][0];
|
|
fm.IDType.value = arrResult[0][1];
|
|
fm.IDTypeName.value = arrResult[0][2];
|
|
fm.IDNo.value = arrResult[0][3];
|
|
fm.InsuredGender.value = arrResult[0][4];
|
|
fm.InsuredGenderName.value = arrResult[0][5];
|
|
fm.InsuredBirthDay.value = arrResult[0][6];
|
|
fm.InsuredAppAge.value = arrResult[0][7];
|
|
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 清空被保人基本信息
|
|
*/
|
|
function emptyCustInfo(){
|
|
|
|
fm.IDType.value="";
|
|
fm.IDTypeName.value="";
|
|
fm.IDNo.value="";
|
|
fm.InsuredGender.value="";
|
|
fm.InsuredGenderName.value="";
|
|
fm.InsuredBirthDay.value="";
|
|
fm.InsuredAppAge.value="";
|
|
}
|
|
|
|
|
|
/**
|
|
* 客户姓名查出多条时,跳转到客户查询页面
|
|
*/
|
|
function showLCInsuredInfo() {
|
|
|
|
var tGrpPropNo=fm.GrpPropNo.value;
|
|
var tInsuredName=fm.InsuredName.value;
|
|
window.open("./EdorNIQueryMain.jsp?GrpPropNo="+tGrpPropNo+"&InsuredName="+tInsuredName+"&ManageCom="+tManageCom,"查询被保人信息",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
}
|
|
|
|
/**
|
|
* 主被保人客户姓名查出多条时,跳转到主被保人客户查询页面
|
|
*/
|
|
function showMainLCInsuredInfo() {
|
|
|
|
var tGrpPropNo=fm.GrpPropNo.value;
|
|
var tmainCustName=fm.mainCustName.value;
|
|
var tmainIDNO = fm.mainCustIDNo.value;
|
|
var tEdorAppNo = fm.EdorAppNo.value ;
|
|
var tEdorType = fm.EdorType.value ;
|
|
window.open("./EdorMQueryMain.jsp?GrpPropNo="+tGrpPropNo+"&mainCustName="+tmainCustName+"&ManageCom="+tManageCom+"&MainIDNO="+tmainIDNO+"&EdorAppNo="+tEdorAppNo+"&EdorType="+tEdorType,"查询主被保人信息",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
}
|
|
|
|
/**
|
|
* 获取返回的客户数据
|
|
*/
|
|
function showUserInfo(tArr) {
|
|
|
|
if (tArr!=null) {
|
|
var Result=new Array();
|
|
Result=tArr;
|
|
fm.InsuredName.value = Result[0];
|
|
fm.InsuredGenderName.value = Result[1];
|
|
fm.InsuredGender.value = Result[6];
|
|
fm.InsuredBirthDay.value= Result[2];
|
|
fm.IDTypeName.value = Result[3];
|
|
fm.IDType.value = Result[5];
|
|
fm.IDNo.value = Result[4];
|
|
//fm.InsuredNo.value = Result[7];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 获取返回的主客户数据
|
|
*/
|
|
function showMainUserInfo(tArr){
|
|
|
|
if (tArr!=null) {
|
|
var Result=new Array();
|
|
Result=tArr;
|
|
fm.mainInsuredNo.value=Result[7];
|
|
fm.mainCustIDNo.value=Result[4];
|
|
fm.mainCustName.value=Result[0];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* 提交前的校验、计算
|
|
*/
|
|
function beforeSubmit() {
|
|
|
|
document.all("InsuredType").disabled=false;
|
|
if(fm.InsuredType.value=='0'){
|
|
if(!verifyForm("fm")){
|
|
document.all("InsuredType").disabled=true;
|
|
return false;
|
|
}
|
|
var IDType = fm.all("IDType").value;
|
|
var IDNo = fm.all("IDNo").value;
|
|
var IDStartDate = fm.all("IDStartDate").value;
|
|
var IDExpDate = fm.all("IDExpDate").value;
|
|
var Birthday = fm.all("InsuredBirthDay").value;
|
|
var InsuredAppAge = fm.all("InsuredAppAge").value;
|
|
if(IDType == "0"){
|
|
|
|
if (IDNo != "" && IDNo !=null ) {
|
|
var tBirthday = getBirthdatByIdNo(IDNo);
|
|
var tsex = getSexByIDNo(IDNo);
|
|
if(tBirthday != Birthday){
|
|
i18nAlert("输入的出生日期与证件号码不一致!", "");
|
|
return false;
|
|
}
|
|
if(tsex != fm.all("InsuredGender").value){
|
|
i18nAlert("输入的性别与证件号码不一致!", "");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//证件有效止期校验
|
|
if (IDStartDate != "") {
|
|
|
|
var isLongValid = fm.IsLongValid.value;
|
|
var YStartDate = IDStartDate.substring(0, 4);
|
|
var YEndDate = IDExpDate.substring(0, 4);
|
|
var MStartDate = IDStartDate.substring(5, 7);
|
|
var MEndDate = IDExpDate.substring(5, 7);
|
|
var DStartDate = IDStartDate.substring(8, 10);
|
|
var DEndDate = IDExpDate.substring(8, 10);
|
|
var YSub = YEndDate - YStartDate;
|
|
var MSub = MEndDate - MStartDate;
|
|
var DSub = DEndDate - DStartDate;
|
|
var ttAppAge = calAgeNew(Birthday, IDStartDate);
|
|
if (ttAppAge < 16) {
|
|
if (YSub != 5 || MSub != 0 || DSub != 0) {
|
|
i18nAlert("客户年龄范围为小于16周岁,起止年-起期年应等于5", "LIS-BQ-0079");
|
|
return false;
|
|
}
|
|
} else if (ttAppAge >= 16 && ttAppAge <= 25) {
|
|
if (YSub != 10 || MSub != 0 || DSub != 0) {
|
|
i18nAlert("客户年龄范围为大于等于16周岁并且小于等于25周岁,起止年-起期年应等于10", "LIS-BQ-0080");
|
|
return false;
|
|
}
|
|
} else if (ttAppAge >= 26 && ttAppAge <= 45) {
|
|
if (YSub != 20 || MSub != 0 || DSub != 0) {
|
|
i18nAlert("客户年龄范围为大于等于26周岁并且小于等于45周岁,起止年-起期年应等于20", "LIS-BQ-0081");
|
|
return false;
|
|
}
|
|
} else {
|
|
if (isLongValid != "1") {
|
|
i18nAlert("客户年龄范围为大于45周岁,证件是否长期应选择【是】", "LIS-BQ-0082");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(fm.relatomain.value!='00'){
|
|
if(fm.mainCustName.value==''){
|
|
i18nAlert("请先录入主被保人信息!", "LIS-03648");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if(fm.ContPlanCode.value==""){
|
|
i18nAlert("方案编码不能为空!", "LIS-02724");
|
|
return false;
|
|
}
|
|
|
|
|
|
if (mOperate=="INSERT" || mOperate=="UPDATE") {
|
|
// if(fm.edorValDate.value ==''){
|
|
// i18nAlert("请录入保全生效日期!", "LIS-03650");
|
|
// return false ;
|
|
// }
|
|
|
|
// 校验生效日期
|
|
var CurrentDate = fm.CurrentDate.value;
|
|
var birthday = fm.InsuredBirthDay.value;
|
|
var IDExpDate = fm.IDExpDate.value;// 证件是否长期有效
|
|
if(birthday>CurrentDate){
|
|
i18nAlert("出生日期必须小于当前日期!", "LIS-03651");
|
|
return false ;
|
|
}
|
|
|
|
|
|
// 校验证件有效期
|
|
if(IDExpDate !=""){
|
|
if(IDExpDate<CurrentDate){
|
|
i18nAlert("证件有效期需大于当前日期", "LIS-03653");
|
|
return false ;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 校验详细信息录入
|
|
if(fm.ProvinceCode.value !=""){
|
|
if(fm.CityCode.value=="" || fm.CountyCode.value ==""||fm.DetailAddress.value=="" ){
|
|
i18nAlert("详细信息中省信息不为空,需要录入市/县/详细信息!", "LIS-03659");
|
|
return false ;
|
|
}
|
|
}
|
|
|
|
// 校验详细信息录入
|
|
if(!checkCity()){
|
|
return false;
|
|
}
|
|
// 校验银行信息
|
|
// var tflag1 = true;
|
|
// var bankFlag = 0;
|
|
// if(fm.HeadBankCode.value!=null || fm.HeadBankCode.value!=""){
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContCommonSql");
|
|
// tSQLInfo.setSqlId("LCContCommonSql9");
|
|
// tSQLInfo.addSubPara(fm.HeadBankCode.value);
|
|
// tSQLInfo.setModule("grp_common");
|
|
// bankFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
// }
|
|
// if(bankFlag =='1'){
|
|
// if(fm.HeadBankCode.value==''&& fm.BankProvince.value==''&& fm.BankCity.value=='' && fm.AccName.value=='' && trim(fm.BankAccNo.value)==''){
|
|
// tflag1= true;
|
|
// }else if(fm.HeadBankCode.value !=''&& fm.BankProvince.value!=''&& fm.BankCity.value!='' && fm.AccName.value!='' && trim(fm.BankAccNo.value)!=''){
|
|
// tflag1= true;
|
|
// }else{
|
|
// tflag1=false;
|
|
// }
|
|
//
|
|
// } else {
|
|
// if(fm.HeadBankCode.value=='' && fm.AccName.value=='' && trim(fm.BankAccNo.value)==''){
|
|
// tflag1= true;
|
|
// }else if(fm.HeadBankCode.value !='' && fm.AccName.value!='' && trim(fm.BankAccNo.value)!=''){
|
|
// tflag1= true;
|
|
// }else{
|
|
// tflag1=false;
|
|
// }
|
|
// }
|
|
// if(tflag1==false){
|
|
// i18nAlert("请填写银行相关信息!", "LIS-03014");
|
|
// return false;
|
|
//
|
|
// }
|
|
|
|
// if(fm.HeadBankCode.value != ''){
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_pos.EdorCommonSql");
|
|
// tSQLInfo.setSqlId("EdorCommonSql7");
|
|
// tSQLInfo.addSubPara(fm.HeadBankCode.value);
|
|
// tSQLInfo.setModule("grp_pa");
|
|
//
|
|
// var arrReslut = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
// if(arrReslut==null){
|
|
// i18nAlert("请选择有效的开户银行 !", "LIS-03336");
|
|
// fm.HeadBankCode.focus();
|
|
// return false;
|
|
// }
|
|
// }
|
|
if(fm.BankProvince.value != ''){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorCommonSql");
|
|
tSQLInfo.setSqlId("EdorCommonSql8");
|
|
tSQLInfo.addSubPara(fm.BankProvince.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrReslut = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if(arrReslut==null){
|
|
i18nAlert("请选择有效的开户行所在省!", "LIS-03337");
|
|
fm.BankProvince.focus();
|
|
return false;
|
|
}
|
|
}
|
|
if(fm.BankCity.value != ''){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorCommonSql");
|
|
tSQLInfo.setSqlId("EdorCommonSql9");
|
|
tSQLInfo.addSubPara(fm.BankProvince.value);
|
|
tSQLInfo.addSubPara(fm.BankCity.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrReslut = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if(arrReslut==null){
|
|
i18nAlert("请选择有效的开户行所在市!", "LIS-03338");
|
|
fm.BankCity.focus();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
// 校验增加受益人信息
|
|
BnfGrid.delBlankLine();
|
|
if(!valBnfInfo()){
|
|
return false;
|
|
}
|
|
if(fm.mainCustName.value !=null && fm.mainCustName.value !=''){
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql4");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.mainCustName.value);
|
|
tSQLInfo.addSubPara(fm.mainCustIDNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
arrResult = easyExecSql(tSQLInfo.getString());
|
|
if(arrResult=='0'){
|
|
i18nAlert(" 没有查询到主被保人,同时增【主附被保险人】的话请使用导入模板!", "LIS-03509");
|
|
fm.mainInsuredNo.value="";
|
|
fm.mainCustName.value="";
|
|
fm.mainCustIDNo.value="";
|
|
return false;
|
|
}
|
|
}
|
|
}else if(fm.InsuredType.value=='1'){
|
|
|
|
// if(fm.edorValDate.value ==""){
|
|
// i18nAlert("保全生效日期不能为空!", "LIS-03662");
|
|
// return false;
|
|
// }
|
|
|
|
if(fm.JGContPlanCode.value==""){
|
|
i18nAlert("方案编码不能为空!", "LIS-02724");
|
|
return false;
|
|
}
|
|
|
|
if(fm.InsuredPeoples.value ==""){
|
|
i18nAlert("被保险人人数不能为空!", "LIS-03663");
|
|
return false;
|
|
}
|
|
}
|
|
AmntGrid.delBlankLine();
|
|
if(!AmntGrid.checkValue("AmntGrid")){
|
|
return false;
|
|
}
|
|
if(AmntGrid.mulLineCount>0){
|
|
for (var i=0; i<AmntGrid.mulLineCount;i++){
|
|
if(AmntGrid.getRowColData(i,7) !=''){
|
|
if(parseFloat(AmntGrid.getRowColData(i,7))>parseFloat(AmntGrid.getRowColData(i,5))){
|
|
i18nAlert("{0}责任录入的保额大于最高保额!", "LIS-03664", AmntGrid.getRowColData(i,4));
|
|
return false;
|
|
}
|
|
if(parseFloat(AmntGrid.getRowColData(i,7))<parseFloat(AmntGrid.getRowColData(i,6))){
|
|
i18nAlert("{0}责任录入的保额小于最低保额!", "LIS-03665", AmntGrid.getRowColData(i,4));
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (fm.Seniority.value!="" && fm.Seniority.value<0) {
|
|
i18nAlert("工龄必须大于等于0!", "LIS-03656");
|
|
return false;
|
|
}
|
|
|
|
// if (fm.GetYear.value!="" && fm.GetYear.value<0) {
|
|
// i18nAlert("领取年龄必须大于等于0!", "LIS-03666");
|
|
// return false;
|
|
// }
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
/**
|
|
*校验受益人信息
|
|
*/
|
|
function valBnfInfo(){
|
|
|
|
var tCount = BnfGrid.mulLineCount;
|
|
var sumRate = 0;
|
|
|
|
if(parseInt(tCount)>0){
|
|
if(!BnfGrid.checkValue("BnfGrid")){
|
|
return false;
|
|
}
|
|
|
|
for (var i=0; i<tCount;i++){
|
|
|
|
for(var j=i+1;j<tCount;j++){
|
|
if(BnfGrid.getRowColData(i,2)!=BnfGrid.getRowColData(j,2)){
|
|
i18nAlert("受益人类别只能录入一种!", "LIS-03327");
|
|
return false;
|
|
}
|
|
}
|
|
if(BnfGrid.getRowColData(i,4)==''){
|
|
if(BnfGrid.getRowColData(i,2)!='00'||BnfGrid.getRowColData(i,5)!=''||
|
|
BnfGrid.getRowColData(i,7)!=''||
|
|
BnfGrid.getRowColData(i,8)!=''||
|
|
BnfGrid.getRowColData(i,10)!=''||
|
|
BnfGrid.getRowColData(i,11)!=''||
|
|
BnfGrid.getRowColData(i,13)!=''){
|
|
i18nAlert("受益人顺序不能为空!", "LIS-03328");
|
|
return false;
|
|
}
|
|
}else{
|
|
if(BnfGrid.getRowColData(i,5)==''){
|
|
i18nAlert("受益人姓名不能为空!", "LIS-03329");
|
|
return false;
|
|
}
|
|
if(BnfGrid.getRowColData(i,2)!='02'){
|
|
|
|
if(BnfGrid.getRowColData(i,10)==''){
|
|
i18nAlert("受益人证件类型不能为空!", "LIS-03330");
|
|
return false;
|
|
}
|
|
if(BnfGrid.getRowColData(i,11)==''){
|
|
i18nAlert("受益人证件号码不能为空!", "LIS-03331");
|
|
return false;
|
|
}
|
|
if(BnfGrid.getRowColData(i,10) !=''){
|
|
if(BnfGrid.getRowColData(i,10)!='0' ){
|
|
if(BnfGrid.getRowColData(i,7)==null || BnfGrid.getRowColData(i,7) =='' && BnfGrid.getRowColData(i,8)==null || BnfGrid.getRowColData(i,8) =='' ){
|
|
i18nAlert("请输入受益人性别/出生日期!", "LIS-03332");
|
|
return false;
|
|
}
|
|
}else if(BnfGrid.getRowColData(i,10)=='0'){
|
|
if(BnfGrid.getRowColData(i,11).length!='18'){
|
|
i18nAlert("受益人身份证号码必须为18位!", "LIS-BQ-0083");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
if(BnfGrid.getRowColData(i,13)==''){
|
|
i18nAlert("与被保险人关系不能为空!", "LIS-03334");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if(BnfGrid.getRowColData(i,14)==''){
|
|
i18nAlert("受益比例不能为空!", "LIS-03335");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
/**
|
|
* 获取页面信息
|
|
*/
|
|
function getCustomerInfo(){
|
|
|
|
var tSelNo= EdorDetailGrid.getSelNo();
|
|
var tSerialno = EdorDetailGrid.getRowColData(tSelNo-1,16);
|
|
var tInsuredID = EdorDetailGrid.getRowColData(tSelNo-1,17);
|
|
var mmBatchNo = EdorDetailGrid.getRowColData(tSelNo-1,14);
|
|
fm.Serialno.value = tSerialno;
|
|
fm.InsuredID.value = tInsuredID;
|
|
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql13");
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(tInsuredID);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if(arrResult !=null){
|
|
queryUnFixedAmnt(tInsuredID);
|
|
fm.AmntFlag.value = "ShowAmnt";
|
|
}else{
|
|
divQueryShow.style.display="none";
|
|
fm.AmntFlag.value = "";
|
|
}
|
|
|
|
queryPayPlan();
|
|
|
|
queryBnf(tInsuredID);
|
|
document.all("InsuredType").disabled=true;
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql1");
|
|
tSQLInfo.addSubPara(tSerialno);
|
|
tSQLInfo.addSubPara(tInsuredID);
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.addSubPara(mmBatchNo);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if(arrResult != null){
|
|
if(arrResult[0][0]=='0'){
|
|
shownewPage.style.display="none";
|
|
divQueryPage.style.display="";
|
|
divQuerybnf.style.display="";
|
|
|
|
fm.InsuredType.value=arrResult[0][0];
|
|
fm.InsuredTypeName.value="个人单";
|
|
fm.relatomain.value = arrResult[0][4];
|
|
|
|
if(arrResult[0][4] != '00'){
|
|
mainname.style.display="";
|
|
mainname1.style.display="";
|
|
mainIDNo.style.display="";
|
|
mainCustNo1.style.display="";
|
|
}else{
|
|
mainname.style.display="none";
|
|
mainname1.style.display="none";
|
|
document.getElementById("mainIDNo").style.display="none";
|
|
mainCustNo1.style.display="none";
|
|
}
|
|
showRelationtoMain(arrResult[0][8], arrResult[0][11]);
|
|
fm.relatomainName.value = arrResult[0][5];
|
|
fm.mainCustName.value = arrResult[0][6];
|
|
fm.mainCustIDNo.value = arrResult[0][7];
|
|
fm.InsuredName.value = arrResult[0][8];
|
|
fm.IDType.value = arrResult[0][9];
|
|
fm.IDTypeName.value = arrResult[0][10];
|
|
fm.IDNo.value = arrResult[0][11];
|
|
fm.InsuredGender.value = arrResult[0][12];
|
|
fm.InsuredGenderName.value = arrResult[0][13];
|
|
fm.InsuredBirthDay.value = arrResult[0][14];
|
|
fm.InsuredAppAge.value = calAge(arrResult[0][14]);
|
|
fm.edorValDate.value = arrResult[0][15];
|
|
fm.ContPlanCode.value = arrResult[0][16];
|
|
fm.ContPlanCodeName.value = arrResult[0][17];
|
|
fm.OccupationCode.value = arrResult[0][18];
|
|
fm.OccupationCodeName.value = arrResult[0][19];
|
|
fm.HeadBankCode.value = arrResult[0][20];
|
|
fm.BankCodeName.value = arrResult[0][21];
|
|
fm.AccName.value = arrResult[0][22];
|
|
fm.BankAccNo.value = arrResult[0][23];
|
|
fm.BankProvince.value = arrResult[0][24];
|
|
fm.BankProvinceName.value = arrResult[0][25];
|
|
fm.BankCity.value = arrResult[0][26];
|
|
fm.BankCityName.value = arrResult[0][27];
|
|
fm.ServerArea.value = arrResult[0][28];
|
|
fm.ServiceArName.value = arrResult[0][29];
|
|
fm.Substandard.value = arrResult[0][30];
|
|
fm.SubstandardName.value = arrResult[0][31];
|
|
fm.Social.value = arrResult[0][32];
|
|
fm.SocialName.value = arrResult[0][33];
|
|
// fm.Position.value = arrResult[0][34];
|
|
fm.JoinCompDate.value = arrResult[0][35];
|
|
fm.Seniority.value = arrResult[0][36];
|
|
fm.Salary.value = arrResult[0][37];
|
|
// fm.WorkIDNo.value = arrResult[0][38];
|
|
fm.IsLongValid.value = arrResult[0][39];
|
|
fm.IsLongValidName.value = arrResult[0][40];
|
|
fm.IDExpDate.value = arrResult[0][41];
|
|
fm.ComponyName.value = arrResult[0][42];
|
|
fm.DeptCode.value = arrResult[0][43];
|
|
// fm.InsureCode.value = arrResult[0][44];
|
|
//fm.SubCustomerNo.value = arrResult[0][45];
|
|
fm.WorkAddress.value = arrResult[0][46];
|
|
fm.SocialAddress.value = arrResult[0][47];
|
|
fm.ZipCode.value = arrResult[0][48];
|
|
fm.EMail.value = arrResult[0][49];
|
|
fm.MicroNo.value = arrResult[0][50];
|
|
fm.Phone.value = arrResult[0][51];
|
|
fm.Mobile.value = arrResult[0][52];
|
|
fm.ProvinceCode.value = arrResult[0][53];
|
|
fm.ProvinceName.value = arrResult[0][54];
|
|
fm.CityCode.value = arrResult[0][55];
|
|
fm.CityName.value = arrResult[0][56];
|
|
fm.CountyCode.value = arrResult[0][57];
|
|
fm.CountyName.value = arrResult[0][58];
|
|
fm.DetailAddress.value = arrResult[0][59];
|
|
|
|
//fm.GetYear.value = arrResult[0][61];
|
|
//fm.GetStartType.value = arrResult[0][62];
|
|
//fm.GetStartTypeName.value = arrResult[0][63];
|
|
// fm.PositionName.value = arrResult[0][64];
|
|
//fm.SubCustomerName.value = arrResult[0][65];
|
|
fm.IDStartDate.value = arrResult[0][66];
|
|
fm.EnterPriseBurden.value = arrResult[0][67];
|
|
fm.PersonBurden.value = arrResult[0][68];
|
|
fm.AccAttributes.value = arrResult[0][69];
|
|
fm.AccAttributesName.value = arrResult[0][70];
|
|
fm.AccType.value = arrResult[0][71];
|
|
fm.AccTypeName.value = arrResult[0][72];
|
|
fm.BankAccSub.value = arrResult[0][73];
|
|
fm.Nationality.value = arrResult[0][74];
|
|
fm.NationalityName.value = arrResult[0][75];
|
|
fm.Marriage.value = arrResult[0][76];
|
|
fm.MarriageName.value = arrResult[0][77];
|
|
fm.WorkState.value = arrResult[0][78];
|
|
fm.WorkStateName.value = arrResult[0][79];
|
|
fm.NativePlace.value = arrResult[0][80];
|
|
fm.NativePlaceName.value = arrResult[0][81];
|
|
fm.PoliticalSecuCoopFlag.value =arrResult[0][82];
|
|
fm.PoliticalSecuCoopFlagName.value =arrResult[0][83];
|
|
fm.IndividualBusOperFlag.value =arrResult[0][84];
|
|
fm.IndividualBusOperFlagName.value =arrResult[0][85];
|
|
fm.DisabledPersonFlag.value =arrResult[0][86];
|
|
fm.DisabledPersonFlagName.value =arrResult[0][87];
|
|
|
|
|
|
|
|
|
|
|
|
// 查询职业类别
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql2");
|
|
tSQLInfo.addSubPara(arrResult[0][18]);
|
|
tSQLInfo.setModule("grp_pa");
|
|
var oarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if(oarrResult !=null){
|
|
fm.OccupationType.value = oarrResult[0][0];
|
|
fm.OccupationTypeName.value = oarrResult[0][1];
|
|
}
|
|
|
|
//fm.PositionName.value = '';
|
|
|
|
}else if(arrResult[0][0]=='1'){
|
|
shownewPage.style.display="";
|
|
divQueryPage.style.display="none";
|
|
divQuerybnf.style.display="none";
|
|
fm.InsuredType.value=arrResult[0][0];
|
|
fm.InsuredTypeName.value=arrResult[0][1];
|
|
fm.edorValDate.value = arrResult[0][15];
|
|
fm.JGContPlanCode.value = arrResult[0][16];
|
|
fm.JGContPlanCodeName.value = arrResult[0][17];
|
|
fm.InsuredPeoples.value = arrResult[0][60];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* 返回上一页面
|
|
*/
|
|
function returnBack(){
|
|
top.close();
|
|
}
|
|
|
|
|
|
/**
|
|
* 清除页面信息
|
|
*/
|
|
function clearPage(){
|
|
|
|
fm.InsuredType.value="0";
|
|
fm.InsuredTypeName.value="个人单";
|
|
fm.ContPlanCode.value="";
|
|
fm.ContPlanCodeName.value="";
|
|
fm.JGContPlanCode.value ="";
|
|
fm.JGContPlanCodeName.value ="";
|
|
fm.InsuredPeoples.value="";
|
|
|
|
fm.relatomain.value="00";
|
|
fm.relatomainName.value="本人";
|
|
fm.mainCustName.value="";
|
|
fm.mainCustIDNo.value="";
|
|
fm.mainInsuredNo.value ="";
|
|
fm.InsuredName.value="";
|
|
fm.IDType.value="";
|
|
fm.IDTypeName.value="";
|
|
fm.IDNo.value="";
|
|
fm.InsuredGender.value="";
|
|
fm.InsuredGenderName.value="";
|
|
fm.InsuredBirthDay.value="";
|
|
fm.InsuredAppAge.value="";
|
|
//企业负担金额
|
|
fm.EnterPriseBurden.value="";
|
|
//个人负担金额
|
|
fm.PersonBurden.value="";
|
|
//证件有效起期
|
|
fm.IDStartDate.value="";
|
|
//证件有效止期
|
|
fm.IDExpDate.value="";
|
|
//国籍
|
|
fm.NativePlace.value="";
|
|
//国籍
|
|
fm.NativePlaceName.value="";
|
|
|
|
fm.WorkState.value = "";
|
|
fm.WorkStateName.value = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fm.OccupationCode.value="";
|
|
fm.OccupationCodeName.value="";
|
|
fm.OccupationType.value="";
|
|
fm.OccupationTypeName.value="";
|
|
fm.ZipCode.value="";
|
|
fm.EMail.value="";
|
|
fm.MicroNo.value="";
|
|
fm.Phone.value="";
|
|
fm.Mobile.value="";
|
|
fm.ProvinceName.value="";
|
|
fm.ProvinceCode.value="";
|
|
fm.CityName.value="";
|
|
fm.CityCode.value="";
|
|
fm.CountyName.value="";
|
|
fm.CountyCode.value="";
|
|
fm.DetailAddress.value="";
|
|
|
|
fm.ServerArea.value="";
|
|
fm.ServiceArName.value="";
|
|
fm.Substandard.value="";
|
|
fm.SubstandardName.value="";
|
|
fm.Social.value="";
|
|
fm.SocialName.value="";
|
|
|
|
fm.IsLongValid.value="";
|
|
fm.IsLongValidName.value="";
|
|
|
|
|
|
fm.JoinCompDate.value="";
|
|
fm.Seniority.value="";
|
|
fm.Salary.value="";
|
|
|
|
//fm.GetYear.value="";
|
|
// fm.GetStartType.value="";
|
|
// fm.GetStartTypeName.value="";
|
|
|
|
fm.HeadBankCode.value="";
|
|
fm.BankCodeName.value="";
|
|
fm.AccName.value="";
|
|
fm.BankAccNo.value="";
|
|
fm.BankProvince.value="";
|
|
fm.BankProvinceName.value="";
|
|
fm.BankCity.value="";
|
|
fm.BankCityName.value="";
|
|
//账户属性
|
|
fm.AccAttributes.value="";
|
|
fm.AccAttributesName.value="";
|
|
//账户类型
|
|
fm.AccType.value="";
|
|
fm.AccTypeName.value="";
|
|
//开户行细分
|
|
fm.BankAccSub.value="";
|
|
|
|
|
|
// fm.WorkIDNo.value="";
|
|
// fm.ISLongValid.value="";
|
|
// fm.ISLongValidName.value="";
|
|
fm.IDExpDate.value="";
|
|
fm.ComponyName.value="";
|
|
fm.DeptCode.value="";
|
|
//民族
|
|
fm.Nationality.value="";
|
|
fm.NationalityName.value="";
|
|
//婚姻状态
|
|
fm.Marriage.value="";
|
|
fm.MarriageName.value="";
|
|
// fm.InsureCode.value="";
|
|
fm.WorkAddress.value="";
|
|
fm.SocialAddress.value="";
|
|
|
|
fm.mainCustNameTemp.value="";
|
|
fm.InsuredNameTemp.value ="";
|
|
fm.edorValDate.value="";
|
|
fm.Serialno.value = "";
|
|
|
|
fm.PoliticalSecuCoopFlag.value ="";
|
|
fm.PoliticalSecuCoopFlagName.value ="";
|
|
fm.IndividualBusOperFlag.value ="";
|
|
fm.IndividualBusOperFlagName.value ="";
|
|
fm.DisabledPersonFlag.value ="";
|
|
fm.DisabledPersonFlagName.value ="";
|
|
|
|
$('#mainname').attr('display','none');
|
|
$('#mainname1').attr('display','none');
|
|
$('#mainIDNo').attr('display','none');
|
|
$('#mainCustNo1').attr('display','none');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* 查询附属被保人信息
|
|
*/
|
|
|
|
function showRelationtoMain(mainName,mainIDNO){
|
|
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql8");
|
|
tSQLInfo.addSubPara(mainName);
|
|
tSQLInfo.addSubPara(mainIDNO);
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if(arrResult !='0'){
|
|
divQuerySpe.style.display="";
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql9");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(mainName);
|
|
tSQLInfo.addSubPara(mainIDNO);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage2.queryModal(tSQLInfo.getString(), QueryInfoGrid, 1,1,10);
|
|
}else{
|
|
divQuerySpe.style.display="none";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 查询受益人信息
|
|
*/
|
|
function queryBnf(insuredid){
|
|
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql11");
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(insuredid);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage3.queryModal(tSQLInfo.getString(), BnfGrid, 1,1,10);
|
|
}
|
|
|
|
/**
|
|
* 查询非固定保额信息
|
|
*/
|
|
function queryUnFixedAmnt(insuredid){
|
|
|
|
divQueryShow.style.display="";
|
|
var querySql = "";
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql13");
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.addSubPara(insuredid);
|
|
tSQLInfo.addSubPara(fm.EdorType.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage4.queryModal(tSQLInfo.getString(), AmntGrid, 1,1,30);
|
|
|
|
}
|
|
|
|
/**
|
|
* 查询被保人缴费项信息
|
|
**/
|
|
function queryPayPlan(){
|
|
|
|
var tSelNo= EdorDetailGrid.getSelNo();
|
|
var tInsuredID = EdorDetailGrid.getRowColData(tSelNo-1,17);
|
|
|
|
initPayPlanGrid();
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql16");
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.addSubPara(tInsuredID);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage5.queryModal(tSQLInfo.getString(), PayPlanGrid, 1, 1);
|
|
|
|
if (turnPage5.strQueryResult) {
|
|
divPayPlanSaveButton.style.display = "";
|
|
divPayPlan.style.display = "";
|
|
divQueryShow.style.display="none";
|
|
} else {
|
|
divPayPlanSaveButton.style.display = "none";
|
|
divPayPlan.style.display = "none";
|
|
}
|
|
|
|
divInvest.style.display = "none";
|
|
}
|
|
|
|
function calEndDate(code,type){
|
|
|
|
if (type == "IDType" && fm.IDType.value == '0' ){
|
|
|
|
var tapage = calAgeNew(fm.InsuredBirthDay.value,fm.IDStartDate.value);
|
|
if(tapage<16){
|
|
var tyear=caldateYear(fm.IDStartDate.value,5);
|
|
fm.IDExpDate.value = tyear;
|
|
}
|
|
if(16<=tapage&&tapage<=25){
|
|
var tyear=caldateYear(fm.IDStartDate.value,10);
|
|
fm.IDExpDate.value = tyear;
|
|
}
|
|
if(26<=tapage&&tapage<=45){
|
|
var tyear=caldateYear(fm.IDStartDate.value,20);
|
|
fm.IDExpDate.value = tyear;
|
|
}
|
|
if(tapage>=46){
|
|
fm.IDExpDate.value = '9999-01-01';
|
|
fm.IsLongValid.value ='1';
|
|
fm.IsLongValidName.value ='是';
|
|
}
|
|
}
|
|
}
|
|
|
|
function caldateYear(tdate,tyear){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql18");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.addSubPara(tdate);
|
|
tSQLInfo.addSubPara(tyear);
|
|
return easyExecSql(tSQLInfo.getString());
|
|
}
|
|
|
|
|
|
/**
|
|
* 查询投资账户信息
|
|
**/
|
|
function queryInvest(){
|
|
|
|
var tSelNo = PayPlanGrid.getSelNo();
|
|
if (tSelNo==0) {
|
|
i18nAlert("请选择一条缴费项信息!", "LIS-03030");
|
|
return false;
|
|
}
|
|
|
|
var tBatchNo = PayPlanGrid.getRowColData(tSelNo-1, 1);
|
|
var tInsuredID = PayPlanGrid.getRowColData(tSelNo-1, 2);
|
|
var tPayPlanID = PayPlanGrid.getRowColData(tSelNo-1, 3);
|
|
|
|
initInvestGrid();
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorNISql");
|
|
tSQLInfo.setSqlId("EdorNISql17");
|
|
tSQLInfo.addSubPara(fm.EdorAppNo.value);
|
|
tSQLInfo.addSubPara(tBatchNo);
|
|
tSQLInfo.addSubPara(tInsuredID);
|
|
tSQLInfo.addSubPara(tPayPlanID);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage6.queryModal(tSQLInfo.getString(), InvestGrid, 1, 1);
|
|
|
|
//如果投资信息超过1行,则录入投资信息,否则直接展示
|
|
divInvest.style.display = "";
|
|
if (InvestGrid.mulLineCount>1) {
|
|
divInvestSaveButton.style.display = "";
|
|
} else {
|
|
divInvestSaveButton.style.display = "none";
|
|
}
|
|
}
|
|
function getAge() {
|
|
|
|
if (fm.InsuredBirthDay.value == "") {
|
|
return;
|
|
}
|
|
if (fm.InsuredBirthDay.value.indexOf('-') == -1) {
|
|
var Year = fm.InsuredBirthDay.value.substring(0, 4);
|
|
var Month = fm.InsuredBirthDay.value.substring(4, 6);
|
|
var Day = fm.InsuredBirthDay.value.substring(6, 8);
|
|
fm.InsuredBirthDay.value = Year + "-" + Month + "-" + Day;
|
|
|
|
if (calAge(fm.InsuredBirthDay.value) < 0) {
|
|
alert("出生日期只能为当前日期以前");
|
|
fm.InsuredAppAge.value = "";
|
|
return;
|
|
}
|
|
fm.InsuredAppAge.value = calAge(fm.InsuredBirthDay.value);
|
|
return;
|
|
}
|
|
|
|
if (calAge(fm.InsuredBirthDay.value) < 0) {
|
|
alert("出生日期只能为当前日期以前");
|
|
fm.InsuredAppAge.value = "";
|
|
return;
|
|
}
|
|
|
|
fm.InsuredAppAge.value = calAge(fm.InsuredBirthDay.value);
|
|
return;
|
|
|
|
}
|
|
|
|
function checkIDEndDate(){
|
|
|
|
if(fm.IsLongValid.value.length>0 && fm.IsLongValid.value=="1") {
|
|
fm.IDExpDate.value ="9999-01-01";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 校验详细地址信息
|
|
*/
|
|
function checkCity(){
|
|
var ProvinceCode =document.all('ProvinceCode').value;
|
|
var CityCode =document.all('CityCode').value;
|
|
var CountyCode =document.all('CountyCode').value;
|
|
|
|
if(ProvinceCode !=""){
|
|
if(CityCode ==''){
|
|
CityCode ='0';
|
|
}
|
|
if(CountyCode ==''){
|
|
CountyCode ='0';
|
|
}
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorBBSql");
|
|
tSQLInfo.setSqlId("EdorBBSql4");
|
|
tSQLInfo.addSubPara(ProvinceCode);
|
|
tSQLInfo.addSubPara(CityCode);
|
|
tSQLInfo.addSubPara(CountyCode);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
var arrResult = easyExecSql(tSQLInfo.getString());
|
|
if(arrResult =='0'){
|
|
i18nAlert("联系地址不存在或者关联不正确", "LIS-03657");
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|