/***************************************************************
*
ProName:LCContPolInput.js
* Title:新单录入
* Description:新单录入
* Copyright:Copyright (c) 2012
* Company:Sinosoft
* @author : 蔡云聪
* @version : 8.0
* @date : 2014-04-28
* @date : 2014-04-28
****************************************************************/
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 turnPage7 = new turnPageClass();
var turnPage8 = new turnPageClass();
var tSQLInfo = new SqlClass();
var mOperate = '';
var tBFFlag = "0";//北京的机构
var tValCheckDate = tCurrentDate;
var sFeatures = "toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
// function getPolicyInfo(){
// if(!getPolicyFlag()){
// return false;
// }
// return true;
// }
function printPrt() {
//判断是否正在打印
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql14");
tSQLInfo.addSubPara(tGrpPropNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArrCom[0][0] === "0") {
if(!confirm("投保单正在打印中,是否重新打印?")){
return;
}
}
if (tArrCom[0][0] === "1") {
if(!confirm("投保单已打印,是否重新打印?")){
return;
}
}
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql12");
tSQLInfo.addSubPara(tGrpContNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArrCom==null){
alert("请点击被保险人清单维护按钮添加被保险人!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql13");
tSQLInfo.addSubPara(tGrpContNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArrCom==null){
if (fm.InsuredAmntFlag.value != "1") {
alert("请先点击被保险人累计身故保额查询按钮!");
return false;
}
}else{
if(tArrCom[0][0] == 0){
alert("请点击被保险人清单维护按钮添加被保险人!");
return false;
}
if(tArrCom[0][0] == 1){
if (fm.deadInsuredAmntFlag.value != "1") {
alert("请先点击未成年人累计身故保额查询!");
return false;
}
if (fm.InsuredAmntFlag.value != "1") {
alert("请先点击被保险人累计身故保额查询按钮!");
return false;
}
}else{
if (fm.InsuredAmntFlag.value != "1") {
alert("请先点击被保险人累计身故保额查询按钮!");
return false;
}
}
}
//导入修改投保客户信息保存必点校验
//导入投保信息投保单位客户号为000000,进行保存操作后更新为共享服务返回客户号
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_common");
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setSqlId("LCContSql230");
tSQLInfo.addSubPara(tGrpContNo);
var tSaveBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tSaveBtnFlag !=null){
alert("存在导入投保单位信息未保存,请点击保存按钮!");
return false;
}
//人名清单确认是否点击校验
//0 必须点击人名清单确认;1 点击之后置1;非0、1,即复核或人核退回投保单,操作人员变更后会置0
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql16");
tSQLInfo.addSubPara(tGrpContNo);
var tBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tBtnFlag !=null && tBtnFlag != "" && tBtnFlag =="0"){
alert("请点击被保险人清单维护界面的人员清单确认按钮!");
return false;
}
//大额交易/黑名单校验
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("checkGrpBlackSql");
tSQLInfo.addSubPara(tGrpPropNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry!=null && tPropEntry[0][0]=="1") {
window.open("./AntiMoneyLauICustInfoMain.jsp?OtherNo="+tGrpPropNo+"&rGrpContNo="+tGrpPropNo+"&standflag=1&GrpName1="+fm.GrpName.value+"&AuditFlag=null","反洗钱客户身份识别信息录入",'height=400,width=1000,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
return ;
}
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/Print?Operate=PRINTPRT";
document.all("Operate").value = "PRINTPRT";
mOperate = "PRINTPRT";
document.all("PrintPtrBtn").disabled=true;
ajaxSubmit(document.getElementById("fm"), resultAfterSubmit);
}
function downPrintPrt(){
//判断是已打印
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql19");
tSQLInfo.addSubPara(tGrpPropNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArrCom[0][0] === "1"){
var tFileName = tGrpPropNo+".pdf";
var tFilePath = tArrCom[0][1];
downloadFile(tFilePath,tFileName,"../API/grp_common/jsp/download/APIDOWNLOAD");
}else if (tArrCom[0][0] === "2"){
alert("投保单打印失败,请重试或联系运维人员!");
return false;
} else if (tArrCom[0][0] === "0"){
alert("投保单正在打印中!");
return false;
}
}
// function showDownPrintflag(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setModule("grp_nb");
// tSQLInfo.setResourceName("g_app.LCPropPrintSql");
// tSQLInfo.setSqlId("LCPropPrintSql19");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// if (tArrCom[0][0] === "1"){
// document.getElementById("DownPrintPtrBtn").style.display = '';
// }
// }
function checkTotalAssets(input){
if (!validateTwoDecimal(input)) {
alert("资产总额只能保存两位小数");
return false;
}
}
/**
* 影像扫描件查询
*/
function queryScanPage1() {
//如果保单已经签单,则使用传入的保单号查询投保书号,否则直接使用投保书号查询影像
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContCommonSql");
tSQLInfo.setSqlId("LCContCommonSql8");
tSQLInfo.addSubPara(tGrpPropNo);
tSQLInfo.setModule("grp_common");
var tPrtNoArr = easyExecSql(tSQLInfo.getString());
if (tPrtNoArr!=null) {
tGrpPropNo = tPrtNoArr[0][0];
}
window.open("../es_common/ImageQueryGrpMain.jsp?BussType=G_NB&BussNo="+tGrpPropNo,null , 'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function showAbnormalInfo1(){
window.open("./LCContAbnormalInfoMain.jsp?ContPlanType="+tContPlanType+"&GrpPropNo="+tGrpPropNo+"&PolicyNo="+tGrpPropNo+"&Flag=1" ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
* 影像问题件
*/
function goToAduioQuestion() {
window.open("./OccQuestAduioMain.jsp?BussType=G_NB&GrpPropNo="+tGrpPropNo,"影像问题件",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function showAgentDetail() {
if(divAgentDetailInfo.style.display=='none') {
divAgentDetailInfo.style.display = '';
} else {
divAgentDetailInfo.style.display = 'none';
initAgentDetailGrid();
}
}
// function showBusinessArea() {
//
// if(divBusinessAreaInfo.style.display=='none') {
// divBusinessAreaInfo.style.display = '';
// } else {
// divBusinessAreaInfo.style.display = 'none';
// initBusinessAreaGrid();
// }
// }
function showAgentCom() {
if(divAgentComInfo.style.display=='none') {
divAgentComInfo.style.display = '';
} else {
divAgentComInfo.style.display = 'none';
initAgentComGrid();
}
}
// function showSaler() {
//
// if(divSalerInfo.style.display=='none') {
// divSalerInfo.style.display = '';
// } else {
// divSalerInfo.style.display = 'none';
// initSalerInfoGrid();
// }
// }
function selectIDInfo() {
if(divIDInfo.style.display=='none') {
divIDInfo.style.display = '';
} else {
divIDInfo.style.display = 'none';
initIDInfoGrid();
}
}
function selectPeopleInfo(){
if(document.all("LinkMan").value=='' || document.all("MobilePhone").value ==''){
alert("请先录入经办人信息才能勾选!");
document.all("TooContect").checked=false;
return false;
}
if(divLinkPeopleInfo.style.display=='none') {
divLinkPeopleInfo.style.display = '';
} else {
divLinkPeopleInfo.style.display = 'none';
}
}
/**
* 选择城市前必须先选择省份
*/
function checkProvince(){
if(document.all("Province").value == ""){
i18nAlert("请先选择省份", "LIS-03010");
document.all("City").value = "";
document.all("CityName").value = "";
}
}
/**
* 选择城市前必须先选择省份
*/
function checkBankProvince(){
if(document.all("BankProvince").value == ""){
i18nAlert("请先选择省份", "LIS-03010");
document.all("BankCity").value = "";
document.all("BankCityName").value = "";
}
}
function clearCity(){
document.all("City").value = "";
document.all("CityName").value = "";
}
function clearBankCity(){
document.all("BankCity").value = "";
document.all("BankCityName").value = "";
}
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 clearCityAndCounty2(){
document.getElementById("LinkCity2").value = "";
document.getElementById("LinkCityCode2").value = "";
document.getElementById("LinkCounty2").value = "";
document.getElementById("LinkCountyCode2").value = "";
}
function clearCounty2(){
document.getElementById("LinkCounty2").value = "";
document.getElementById("LinkCountyCode2").value = "";
}
/**
* 清空关联查询的项目
*/
function clearInput(codeInput,nameInput) {
codeInput.value = "";
nameInput.value = "";
}
/**
* 展示人核退回原因
*/
function initBackReason() {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql64");
tSQLInfo.addSubPara(tGrpPropNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry!=null&&tPropEntry !="") {
document.getElementById("BackReasonDiv").style.display = '';
document.all("BackReason").value=tPropEntry[0][0];
}
}
function queryClick() {
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCQualitySql");
tSQLInfo.setSqlId("LCQualitySql6");
tSQLInfo.addSubPara(tQualityGrpcontNo);
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tArr == null || tArr[0][0] == null || tArr[0][0] == ''){
alert("未查询核保结论数据!");
return false;
}else{
if(tArr[0][0] == '1'){
document.getElementById("UWOption").value = '自核已通过';
document.getElementById("Conclusion1").value = '0';
document.getElementById("ConclusionName").value = '同意';
}else{
document.getElementById("UWOption").value =tArr[0][1];
document.getElementById("Conclusion1").value = '0';
document.getElementById("ConclusionName").value = '同意';
}
}
}
/**
* 查询质检结论
*/
function queryClick2() {
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCQualitySql");
tSQLInfo.setSqlId("LCQualitySql7");
tSQLInfo.addSubPara(tQualityGrpcontNo);
tSQLInfo.addSubPara(tPatchNo);
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tArr == null){
alert("未查询到数据!");
return false;
}else{
document.getElementById("IfError").value = tArr[0][0];
document.getElementById("IfErrorName").value = tArr[0][1];
document.getElementById("LoseScores").value = tArr[0][2];
document.getElementById("ErrorDetails").value = tArr[0][3];
}
}
function qualitySave(){
// if (!verifyForm("fm")) {
// return false;
// }
if(document.getElementById("IfError").value == null || document.getElementById("IfError").value == ''){
alert("请填写差错类型");
return false;
}
if(document.getElementById("IfError").value == '1'){
if(document.getElementById("LoseScores").value == null || document.getElementById("LoseScores").value == ''){
alert("差错类型为是,请填写扣分分值!");
return false;
}else{
const reg = /^([0-9][0-9]{0,1}|100)$/ //注意此处细节
if(reg.test(document.getElementById("LoseScores").value) == false){
alert("扣分分值只能是大于等于0,小于等于100的正整数!");
return false;
}
}
if(document.getElementById("ErrorDetails").value == null || document.getElementById("ErrorDetails").value == ''){
alert("差错类型为是,请填写差错描述!");
return false;
}
}
if(document.getElementById("IfError").value == '0'){
// const reg = /^([0-9][0-9]{0,1}|100)$/ //注意此处细节
// if(reg.test(document.getElementById("LoseScores").value) == false){
// alert("扣分分值只能是大于等于0,小于等于100的正整数!");
// return false;
// }
}
fm.action = "../API/grp_nb/g_app/LCQualityController/SAVE?Operate=SAVE&GrpContNo="+tQualityGrpcontNo+"&PatchNo="+tPatchNo;
submitForm(fm,'SAVE',true);
initForm();
}
function qualitySubmit(){
fm.action = "../API/grp_nb/g_app/LCQualityController/SUBMIT?Operate=SUBMIT&GrpContNo="+tQualityGrpcontNo+"&PatchNo="+tPatchNo;
submitForm(fm,'SUBMIT',true);
initForm();
}
function showGrpIDInfo(){
document.all("IDInfo").checked='true';
divIDInfo.style.display='';
initIDInfoGrid();
IDInfoGrid.addOne();
var rowNum=IDInfoGrid.mulLineCount;
IDInfoGrid.setRowColData(rowNum-1,1,"3");
IDInfoGrid.setRowColData(rowNum-1,2,"税务登记证");
}
//基本投保信息
function initEntry(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
if(tFlag=='4'){
if (/^8/.test(tGrpPropNo)) {
tSQLInfo.setSqlId("LCContSql3");
} else {
tSQLInfo.setSqlId("LCContSql226");
}
}else{
tSQLInfo.setSqlId("LCContSql3");
}
tSQLInfo.addSubPara(tGrpPropNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
//没有查到lcgrpcont,则反显询价和续保的信息
queryQuotInfo();
//投保申请日期应默认当前系统时间
showPolicyAppDate();
if(tFlag=='0'){
//初始化单位多证件mulLine
// showGrpIDInfo();
}
} else if (tPropEntry!=null&&(tPropEntry[0][4]==null||tPropEntry[0][4]=="")&&tPropEntry[0][43]=="000000") {
//查到lcgrpcont,但是只是导入投保人暂存信息,则反显询价基本信息+导入投保单位信息
queryQuotAndImpInfo();
//投保申请日期应默认当前系统时间
showPolicyAppDate();
} else {
//查到lcgrpcont,则反显契约的信息
document.all("ManageCom").value=tPropEntry[0][0];
document.all("ManageComName").value=tPropEntry[0][1];
document.all("SaleDepart").value=tPropEntry[0][2];
document.all("SaleDepartName").value=tPropEntry[0][3];
// document.all("ChnlType").value=tPropEntry[0][4];
// document.all("ChnlTypeName").value=tPropEntry[0][5];
document.all("SaleChnl").value=tPropEntry[0][4];
document.all("SaleChnlName").value=tPropEntry[0][5];
//document.all("ProjectType").value=tPropEntry[0][8];
document.all("OperSource").value=tPropEntry[0][6];
document.all("OperSourceName").value=tPropEntry[0][7];
document.all("PolicyAppDate").value=tPropEntry[0][8];
document.all("ValDateType").value=tPropEntry[0][9];
document.all("ValdateTypeName").value=tPropEntry[0][10];
document.all("ValDate").value=tPropEntry[0][11];
document.all("RenewFlag").value=tPropEntry[0][12];
document.all("RenewFlagName").value=tPropEntry[0][13];
document.all("RenewGrpContNo").value=tPropEntry[0][14];
document.all("PayintvType").value=tPropEntry[0][15];
document.all("payintvName").value=tPropEntry[0][16];
if(tPropEntry[0][17]=='0'){
document.all("InsuPeriod").value='';
}else{
document.all("InsuPeriod").value=tPropEntry[0][17];
}
document.all("InsuPeriodFlagName").value=tPropEntry[0][18];
document.all("InsuPeriodFlag").value=tPropEntry[0][19];
document.all("GrpSpec").value = tPropEntry[0][20];
//document.all("ProjectTypeName").value=tPropEntry[0][21];
if(document.all("ValDateType").value=='0'){
valDatename.style.display="none";
valDatename1.style.display="none";
}else {
valDatename.style.display="";
valDatename1.style.display="";
}
document.all("Coinsurance").value=tPropEntry[0][22];
document.all("CoinsuranceName").value=tPropEntry[0][23];
document.all("IsElecFlag").value=tPropEntry[0][24];
document.all("IsElecFlagName").value=tPropEntry[0][25];
document.all("Relateflag").value=tPropEntry[0][26];
document.all("RelateflagName").value=tPropEntry[0][27];
document.all("OperSourceType").value=tPropEntry[0][28];
document.all("OperSourceTypeName").value=tPropEntry[0][29];
document.all("PrintType").value=tPropEntry[0][30];
document.all("PrintTypeName").value=tPropEntry[0][31];
document.all("PersonPrintFlag").value=tPropEntry[0][32];
document.all("PersonPrintFlagName").value=tPropEntry[0][33];
document.all("IsDistribute").value=tPropEntry[0][34];
document.all("IsDistributeName").value=tPropEntry[0][35];
document.all("ForceChkProfessRate").value=tPropEntry[0][36];
document.all("ForceChkProfessRateName").value=tPropEntry[0][37];
document.all("ForceChkNum").value=tPropEntry[0][38];
document.all("ForceChkNumName").value=tPropEntry[0][39];
document.all("BlanketFlag").value=tPropEntry[0][40];
document.all("BlanketFlagName").value=tPropEntry[0][41];
document.all("SumPrems").value=tPropEntry[0][42];
document.all("IsWait").value=tPropEntry[0][44];
if (tPropEntry[0][44] == '1'){
document.all("IsWaitName").value='有等待期';
}else if (tPropEntry[0][44] == '0'){
document.all("IsWaitName").value='无等待期';
}
//保费分摊方式
fm.PremMode.value = tPropEntry[0][45];
fm.PremModeName.value = tPropEntry[0][46];
fm.ABCOperSourceType.value = tPropEntry[0][47];
fm.ABCOperSourceTypeName.value = tPropEntry[0][48];
if(tPropEntry[0][49] != "" && tPropEntry[0][49] != null && tPropEntry[0][50] != "" && tPropEntry[0][50] != null){
fm.PoliticalSecuCoopFlag.value = tPropEntry[0][49];
fm.PoliticalSecuCoopFlagName.value = tPropEntry[0][50];
}else {
fm.PoliticalSecuCoopFlag.value = "0";
fm.PoliticalSecuCoopFlagName.value = "否";
}
if(tPropEntry[0][51] != "" && tPropEntry[0][51] != null && tPropEntry[0][52] != "" && tPropEntry[0][52] != null){
fm.InternetBusinessFlag.value = tPropEntry[0][51];
fm.InternetBusinessFlagName.value = tPropEntry[0][52];
}else {
fm.InternetBusinessFlag.value = "0";
fm.InternetBusinessFlagName.value = "否";
}
if(tPropEntry[0][53] != "" && tPropEntry[0][53] != null && tPropEntry[0][54] != "" && tPropEntry[0][54] != null){
fm.IntermeInternetBusFlag.value = tPropEntry[0][53];
fm.IntermeInternetBusFlagName.value = tPropEntry[0][54];
}else {
fm.IntermeInternetBusFlag.value = "0";
fm.IntermeInternetBusFlagName.value = "否";
}
if(tPropEntry[0][55] != "" && tPropEntry[0][55] != null && tPropEntry[0][56] != "" && tPropEntry[0][56] != null){
fm.DirectSalesInternetBusFlag.value = tPropEntry[0][55];
fm.DirectSalesInternetBusFlagName.value = tPropEntry[0][56];
}else {
fm.DirectSalesInternetBusFlag.value = "0";
fm.DirectSalesInternetBusFlagName.value = "否";
}
if(tPropEntry[0][57] != "" && tPropEntry[0][57] != null && tPropEntry[0][58] != "" && tPropEntry[0][58] != null){
fm.SelfSupInternetPlatFlag.value = tPropEntry[0][57];
fm.SelfSupInternetPlatFlagName.value = tPropEntry[0][58];
}else {
fm.SelfSupInternetPlatFlag.value = "0";
fm.SelfSupInternetPlatFlagName.value = "否";
}
fm.QuotNo.value = tPropEntry[0][60];
//document.all("Segment1").value=tPropEntry[0][25];
initEntry1(tGrpPropNo);
initEntry2(tGrpPropNo);
initEntry3(tGrpPropNo);
// initEntry4();
initEntry5(tGrpPropNo);
initEntry6();
// initEntry7();
initEntry8();
//initEntry9();
initEntry10(tGrpPropNo);
initEntry11(tGrpPropNo);
// initEntry12();
initEntry13(tGrpPropNo);
queryRisk();
}
}
function queryQuotAndImpInfo(){
var tPropEntry;
//一般询价
if (tQuotType=="00"){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql46");
tSQLInfo.addSubPara(tGrpPropNo);
tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
} else if(tQuotType=="01"){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql47");
tSQLInfo.addSubPara(tGrpPropNo);
tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
}
if (tPropEntry != null){
document.all("RenewFlag").value=tPropEntry[0][0];
document.all("RenewFlagName").value=tPropEntry[0][1];
document.all("RenewGrpContNo").value=tPropEntry[0][2];
document.all("ManageCom").value=tPropEntry[0][3];
document.all("ManageComName").value=tPropEntry[0][4];
document.all("SaleDepart").value=tPropEntry[0][5];
document.all("SaleDepartName").value=tPropEntry[0][6];
document.all("SaleChnl").value=tPropEntry[0][7];
document.all("SaleChnlName").value=tPropEntry[0][8];
document.all("OperSource").value=tPropEntry[0][9];
document.all("OperSourceName").value=tPropEntry[0][10];
document.all("PayintvType").value=tPropEntry[0][11];
document.all("payintvName").value=tPropEntry[0][12];
document.all("IsElecFlag").value=tPropEntry[0][13];
document.all("IsElecFlagName").value=tPropEntry[0][14];
document.all("ForceChkProfessRate").value=tPropEntry[0][15];
document.all("ForceChkProfessRateName").value=tPropEntry[0][16];
document.all("ForceChkNum").value=tPropEntry[0][17];
document.all("ForceChkNumName").value=tPropEntry[0][18];
document.all("BlanketFlag").value=tPropEntry[0][19];
document.all("BlanketFlagName").value=tPropEntry[0][20];
document.all("Coinsurance").value=tPropEntry[0][21];
document.all("CoinsuranceName").value=tPropEntry[0][22];
if (tPropEntry[0][23] !=null && tPropEntry[0][23] !=""){
AgentDetailGrid.addOne("AgentDetailGrid");
var rowNum=AgentDetailGrid.mulLineCount;
AgentDetailGrid.setRowColData(rowNum-1,1,tPropEntry[0][23]);
AgentDetailGrid.setRowColData(rowNum-1,2,tPropEntry[0][24]);
AgentDetailGrid.setRowColData(rowNum-1,3,tPropEntry[0][25]);
AgentDetailGrid.setRowColData(rowNum-1,4,'1');
AgentDetailGrid.setRowColData(rowNum-1,5,'1');
AgentDetailGrid.setRowColData(rowNum-1,6,'是');
}
if (tPropEntry[0][26] !=null && tPropEntry[0][26] !=""){
document.all("AgentCom").checked='true';
divAgentComInfo.style.display='';
AgentComGrid.addOne();
var rowNum=AgentComGrid.mulLineCount;
AgentComGrid.setRowColData(rowNum-1,1,tPropEntry[0][26]);
AgentComGrid.setRowColData(rowNum-1,2,tPropEntry[0][27]);
}
document.all("GrpName").value=tPropEntry[0][28];
document.all("GrpNature").value=tPropEntry[0][29];
document.all("GrpNatureName").value=tPropEntry[0][30];
document.all("GrpIDType").value=tPropEntry[0][31];
document.all("GrpIDTypeName").value=tPropEntry[0][32];
document.all("GrpID").value=tPropEntry[0][33];
document.all("BusiCategory").value=tPropEntry[0][34];
document.all("BusiCategoryName").value=tPropEntry[0][35];
document.all("GrpSpec").value=tPropEntry[0][36];
document.all("IsWait").value=tPropEntry[0][37];
if (tPropEntry[0][37] == '1'){
document.all("IsWaitName").value='有等待期';
}else if (tPropEntry[0][37] == '0'){
document.all("IsWaitName").value='无等待期';
}
//反显导入投保人暂存表信息
initEntry1(tGrpContNo);
initEntry2(tGrpContNo);
initEntry3(tGrpContNo);
initEntry5(tGrpContNo);
initEntry10(tGrpContNo);
initEntry11(tGrpContNo);
initEntry13(tGrpContNo);
}
}function queryPreparCustomer(){
if (fm.PreparCustomer.value == null) {
alert("请录入准机构客户");
return false;
}
var strUrl ="./LCPreparCustomerMain.jsp?PreparCustomer="+ fm.PreparCustomer.value;
window.open(strUrl,'LCPreparCustomerMain','width='+screen.availWidth+',height='+screen.availHeight+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function afterQuery2(tPreCustomerNo){
fm.PreparCustomerNo.value = tPreCustomerNo;
try{
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql182");
tSQLInfo.addSubPara(tPreCustomerNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
}else{
document.getElementById("GrpName").value = tPropEntry[0][1];
document.getElementById("GrpIDType").value = tPropEntry[0][2];
document.getElementById("GrpIDTypeName").value = tPropEntry[0][3];
document.getElementById("GrpID").value = tPropEntry[0][4];
document.getElementById("GrpIDStartDate").value = tPropEntry[0][5];
document.getElementById("GrpIDExpiryDate").value = tPropEntry[0][6];
document.getElementById("MainBusiness").value = tPropEntry[0][7];
document.getElementById("GrpNature").value = tPropEntry[0][8];
document.getElementById("GrpNatureName").value = tPropEntry[0][9];
document.getElementById("BusiCategory").value = tPropEntry[0][10];
document.getElementById("BusiCategoryName").value = tPropEntry[0][11];
document.getElementById("Phone1").value = tPropEntry[0][12];
document.getElementById("Corporation").value = tPropEntry[0][13];
document.getElementById("CorIDType").value = tPropEntry[0][14];
document.getElementById("CorIDTypeName").value = tPropEntry[0][15];
document.getElementById("CorID").value = tPropEntry[0][16];
document.getElementById("CorIDStartDate").value = tPropEntry[0][17];
document.getElementById("CorIDExpiryDate").value = tPropEntry[0][18];
document.getElementById("ProvinceName").value = tPropEntry[0][20];
document.getElementById("CityName").value = tPropEntry[0][22];
document.getElementById("CountyName").value = tPropEntry[0][24];
document.getElementById("DetailAddress").value = tPropEntry[0][25];
document.getElementById("ZipCode").value = tPropEntry[0][26];
document.getElementById("LinkMan").value = tPropEntry[0][27];
document.getElementById("IDType").value = tPropEntry[0][28];
document.getElementById("IDTypeName").value = tPropEntry[0][29];
document.getElementById("IDNo").value = tPropEntry[0][30];
document.getElementById("IDStartDate").value = tPropEntry[0][31];
document.getElementById("IDEndDate").value = tPropEntry[0][32];
document.getElementById("MobilePhone").value = tPropEntry[0][33];
document.getElementById("Phone2").value = tPropEntry[0][34];
document.getElementById("EMail").value = tPropEntry[0][35];
document.getElementById("Department").value = tPropEntry[0][36];
document.getElementById("IncomeAmnt").value = tPropEntry[0][37];
document.getElementById("TotalAssets").value = tPropEntry[0][38];
document.getElementById("PayType").value = tPropEntry[0][39];
document.getElementById("PayTypeName").value = tPropEntry[0][40];
document.getElementById("AccName").value = tPropEntry[0][41];
document.getElementById("BankAccNo").value = tPropEntry[0][42];
document.getElementById("BankCode").value = tPropEntry[0][43];
document.getElementById("BankCodeName").value = tPropEntry[0][44];
document.getElementById("BankProvince").value = tPropEntry[0][45];
document.getElementById("BankProvinceName").value = tPropEntry[0][46];
document.getElementById("BankCity").value = tPropEntry[0][47];
document.getElementById("BankCityName").value = tPropEntry[0][48];
document.getElementById("AccAttributes").value = tPropEntry[0][49];
document.getElementById("AccAttributesName").value = tPropEntry[0][50];
document.getElementById("AccType2").value = tPropEntry[0][51];
document.getElementById("AccTypeName2").value = tPropEntry[0][52];
document.getElementById("BankAccSub2").value = tPropEntry[0][53];
document.getElementById("PoliticalSecuCoopFlag").value = tPropEntry[0][54];
document.getElementById("PoliticalSecuCoopFlagName").value = tPropEntry[0][55];
document.getElementById("Relateflag").value = tPropEntry[0][56];
document.getElementById("RelateflagName").value = tPropEntry[0][57];
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_quot.LSQuotSql");
// tSQLInfo.setSqlId("LSQuotSql103");
// tSQLInfo.setModule("grp_quotation");
// tSQLInfo.addSubPara(tPreCustomerNo);
// turnPage5.queryModal(tSQLInfo.getString(), IDInfoGrid, 1, 1);
// if(!turnPage5.strQueryResult){
// initIDInfoGrid();
// document.all("IDInfo").checked='';
// divIDInfo.style.display='none';
// }else{
// document.all("IDInfo").checked='true';
// divIDInfo.style.display='';
// }
}
}catch (ex) {
}
}
function queryQuotInfo(){
var tPropEntry;
//一般询价
if (tQuotType=="00"){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql46");
tSQLInfo.addSubPara(tGrpPropNo);
tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
} else if(tQuotType=="01"){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql47");
tSQLInfo.addSubPara(tGrpPropNo);
tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
}
if (tPropEntry != null){
document.all("RenewFlag").value=tPropEntry[0][0];
document.all("RenewFlagName").value=tPropEntry[0][1];
document.all("RenewGrpContNo").value=tPropEntry[0][2];
document.all("ManageCom").value=tPropEntry[0][3];
document.all("ManageComName").value=tPropEntry[0][4];
document.all("SaleDepart").value=tPropEntry[0][5];
document.all("SaleDepartName").value=tPropEntry[0][6];
document.all("SaleChnl").value=tPropEntry[0][7];
document.all("SaleChnlName").value=tPropEntry[0][8];
document.all("OperSource").value=tPropEntry[0][9];
document.all("OperSourceName").value=tPropEntry[0][10];
document.all("PayintvType").value=tPropEntry[0][11];
document.all("payintvName").value=tPropEntry[0][12];
document.all("IsElecFlag").value=tPropEntry[0][13];
document.all("IsElecFlagName").value=tPropEntry[0][14];
document.all("ForceChkProfessRate").value=tPropEntry[0][15];
document.all("ForceChkProfessRateName").value=tPropEntry[0][16];
document.all("ForceChkNum").value=tPropEntry[0][17];
document.all("ForceChkNumName").value=tPropEntry[0][18];
document.all("BlanketFlag").value=tPropEntry[0][19];
document.all("BlanketFlagName").value=tPropEntry[0][20];
document.all("Coinsurance").value=tPropEntry[0][21];
document.all("CoinsuranceName").value=tPropEntry[0][22];
if (tPropEntry[0][23] !=null && tPropEntry[0][23] !=""){
AgentDetailGrid.addOne("AgentDetailGrid");
var rowNum=AgentDetailGrid.mulLineCount;
AgentDetailGrid.setRowColData(rowNum-1,1,tPropEntry[0][23]);
AgentDetailGrid.setRowColData(rowNum-1,2,tPropEntry[0][24]);
AgentDetailGrid.setRowColData(rowNum-1,3,tPropEntry[0][25]);
AgentDetailGrid.setRowColData(rowNum-1,4,'1');
AgentDetailGrid.setRowColData(rowNum-1,5,'1');
AgentDetailGrid.setRowColData(rowNum-1,6,'是');
}
if (tPropEntry[0][26] !=null && tPropEntry[0][26] !=""){
document.all("AgentCom").checked='true';
divAgentComInfo.style.display='';
AgentComGrid.addOne();
var rowNum=AgentComGrid.mulLineCount;
AgentComGrid.setRowColData(rowNum-1,1,tPropEntry[0][26]);
AgentComGrid.setRowColData(rowNum-1,2,tPropEntry[0][27]);
}
document.all("GrpName").value=tPropEntry[0][28];
document.all("GrpNature").value=tPropEntry[0][29];
document.all("GrpNatureName").value=tPropEntry[0][30];
document.all("GrpIDType").value=tPropEntry[0][31];
document.all("GrpIDTypeName").value=tPropEntry[0][32];
document.all("GrpID").value=tPropEntry[0][33];
document.all("BusiCategory").value=tPropEntry[0][34];
document.all("BusiCategoryName").value=tPropEntry[0][35];
document.all("GrpSpec").value=tPropEntry[0][36];
document.all("IsWait").value=tPropEntry[0][37];
if (document.all("RenewFlag").value=="1") {
copyRenewInfo();
}
if (tPropEntry[0][37] == '1'){
document.all("IsWaitName").value='有等待期';
}else if (tPropEntry[0][37] == '0'){
document.all("IsWaitName").value='无等待期';
}
}
}
function copyRenewInfo(){
if (document.all("RenewFlag").value=="1"){
var tRenewGrpContNo=document.all("RenewGrpContNo").value;
if (tRenewGrpContNo==null||tRenewGrpContNo==""||tRenewGrpContNo==undefined){
alert("是否为连续投保为是,请输入上一年度保单号!")
}else{
initEntry1(tRenewGrpContNo);
initEntry2(tRenewGrpContNo);
initEntry3(tRenewGrpContNo);
initEntry5(tRenewGrpContNo);
initEntry10(tRenewGrpContNo);
initEntry11(tRenewGrpContNo);
initEntry13(tRenewGrpContNo);
}
}
}
//投保人资料
function initEntry1(tGContNo){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
if(tFlag=='4'){
if (/^8/.test(tGrpPropNo)) {
tSQLInfo.setSqlId("LCContSql4");
} else {
tSQLInfo.setSqlId("LCContSql225");
}
}else{
tSQLInfo.setSqlId("LCContSql4");
}
tSQLInfo.addSubPara(tGContNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
return false;
} else {
document.all("GrpName").value=tPropEntry[0][0];
document.all("SumNumPeople").value=tPropEntry[0][1];
document.all("MainBusiness").value=tPropEntry[0][2];
document.all("GrpNature").value=tPropEntry[0][3];
document.all("GrpNatureName").value=tPropEntry[0][4];
document.all("BusiCategory").value=tPropEntry[0][5];
document.all("BusiCategoryName").value=tPropEntry[0][6];
// document.all("SocialInsuCode").value=tPropEntry[0][7];
document.all("Phone1").value=tPropEntry[0][8];
// document.all("Fax").value=tPropEntry[0][9];
document.all("Corporation").value=tPropEntry[0][10];
document.all("CorIDType").value=tPropEntry[0][11];
document.all("CorIDTypeName").value=tPropEntry[0][12];
document.all("CorID").value=tPropEntry[0][13];
document.all("CorIDStartDate").value=tPropEntry[0][14];
document.all("CorIDExpiryDate").value=tPropEntry[0][15];
// document.all("AppntNo").value=tPropEntry[0][15];
document.all("InstScateGory").value=tPropEntry[0][16];
document.all("InstScateGoryName").value=tPropEntry[0][17];
document.all("ControlTaxrStype").value=tPropEntry[0][18];
document.all("ControlTaxrStypeName").value=tPropEntry[0][19];
document.all("TaxrStatus").value=tPropEntry[0][20];
document.all("TaxrStatusName").value=tPropEntry[0][21];
// if(document.all("TaxrStatus").value=="4"&&document.all("InstScateGory").value=="3"){
// document.all("TaxrStatus").disabled = true;
// document.all("TaxrStatusName").readOnly = true;
// }
document.all("AllOnWorkPeoples").value=tPropEntry[0][22];
document.all("AllOffWorkPeoples").value=tPropEntry[0][23];
document.all("MainInsuPeoples").value=tPropEntry[0][24];
document.all("RelaInsuPeoples").value=tPropEntry[0][25];
document.all("SumInsuPeoples").value=tPropEntry[0][26];
document.all("AuthorizerFlag").value=tPropEntry[0][27];
document.all("AuthorizerFlagName").value=tPropEntry[0][28];
document.all("ProvincialMngFlag").value=tPropEntry[0][29];
document.all("ProvincialMngFlagName").value=tPropEntry[0][30];
document.all("GreenSign").value=tPropEntry[0][31];
document.all("GreenSignName").value=tPropEntry[0][32];
document.all("EnterpriseFlag").value=tPropEntry[0][33];
document.all("EnterpriseFlagName").value=tPropEntry[0][34];
document.all("IncomeAmnt").value=tPropEntry[0][35];
document.all("TotalAssets").value=tPropEntry[0][36];
document.all("SCFInsuranceFlag").value=tPropEntry[0][37];
document.all("SCFInsuranceFlagName").value=tPropEntry[0][38];
document.all("ProductChainFlag").value=tPropEntry[0][39];
document.all("ProductChainFlagName").value=tPropEntry[0][40];
document.all("PowerGridFlag").value=tPropEntry[0][41];
document.all("PowerGridFlagName").value=tPropEntry[0][42];
document.all("NewEnergyFlag").value=tPropEntry[0][43];
document.all("NewEnergyFlagName").value=tPropEntry[0][44];
document.all("ElectricalBusi").value=tPropEntry[0][45];
document.all("ElectricalBusiName").value=tPropEntry[0][46];
document.all("DisputedFlag").value=tPropEntry[0][47];
document.all("DisputedFlagName").value=tPropEntry[0][48];
document.all("ArbitrationCom").value=tPropEntry[0][49];
document.all("PartnerName1").value=tPropEntry[0][50];
document.all("GrpNature1").value=tPropEntry[0][51];
document.all("GrpNatureName1").value=tPropEntry[0][52];
document.all("PartnerName2").value=tPropEntry[0][53];
document.all("GrpNature2").value=tPropEntry[0][54];
document.all("GrpNatureName2").value=tPropEntry[0][55];
document.all("PartnerName3").value=tPropEntry[0][56];
document.all("GrpNature3").value=tPropEntry[0][57];
document.all("GrpNatureName3").value=tPropEntry[0][58];
document.all("OtherIDType").value=tPropEntry[0][59];
document.all("OtherIDNo").value=tPropEntry[0][60];
document.all("grpType").value=tPropEntry[0][62];
document.all("grpTypeName").value=tPropEntry[0][63];
document.all("cDate").value=tPropEntry[0][64];
document.all("bussarea").value=tPropEntry[0][65];
document.all("bussareaName").value=tPropEntry[0][66];
document.all("Corporation1").value=tPropEntry[0][67];
document.all("CorIDType1").value=tPropEntry[0][68];
document.all("CorIDTypeName1").value=tPropEntry[0][69];
document.all("CorID1").value=tPropEntry[0][70];
document.all("CorIDStartDate1").value=tPropEntry[0][71];
document.all("CorIDExpiryDate1").value=tPropEntry[0][72];
}
}
//初始化省市县
function initEntry2(tGContNo){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql5");
tSQLInfo.addSubPara(tGContNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
return false;
} else {
document.all("ProvinceCode").value=tPropEntry[0][1];
document.all("ProvinceName").value=tPropEntry[0][2];
document.all("CityCode").value=tPropEntry[0][3];
document.all("CityName").value=tPropEntry[0][4];
document.all("CountyCode").value=tPropEntry[0][5];
document.all("CountyName").value=tPropEntry[0][6];
document.all("DetailAddress").value=tPropEntry[0][7];
document.all("ZipCode").value=tPropEntry[0][8];
document.all("LinkProvinceCode2").value=tPropEntry[0][9];
document.all("LinkProvince2").value=tPropEntry[0][10];
document.all("LinkCityCode2").value=tPropEntry[0][11];
document.all("LinkCity2").value=tPropEntry[0][12];
document.all("LinkCountyCode2").value=tPropEntry[0][13];
document.all("LinkCounty2").value=tPropEntry[0][14];
document.all("LinkDetailAddr").value=tPropEntry[0][15];
}
}
//初始化联系人信息
function initEntry3(tGContNo){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql6");
tSQLInfo.addSubPara(tGContNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
return false;
} else {
document.all("LinkMan").value=tPropEntry[0][0];
document.all("Phone2").value=tPropEntry[0][1];
document.all("EMail").value=tPropEntry[0][2];
document.all("MobilePhone").value=tPropEntry[0][3];
document.all("Department").value=tPropEntry[0][4];
document.all("IDType").value=tPropEntry[0][5];
document.all("IDTypeName").value=tPropEntry[0][6];
document.all("IDNo").value=tPropEntry[0][7];
document.all("IDStartDate").value=tPropEntry[0][8];
document.all("IDEndDate").value=tPropEntry[0][9];
}
}
//初始化工程信息
// function initEntry4(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql7");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tPropEntry==null) {
// return false;
// } else {
// document.all("EnginName").value=tPropEntry[0][0];
// document.all("ContractorName").value=tPropEntry[0][1];
// document.all("ContractorType").value=tPropEntry[0][2];
// document.all("ContractorTypeName").value=tPropEntry[0][3];
// document.all("EnginPlace").value=tPropEntry[0][4];
// document.all("DetailDes").value=tPropEntry[0][5];
// document.all("EnginStartDate").value=tPropEntry[0][6];
// document.all("EnginEndDate").value=tPropEntry[0][7];
// document.all("EnginCost").value=tPropEntry[0][8];
// document.all("EnginArea").value=tPropEntry[0][9];
// document.all("EnginType").value=tPropEntry[0][10];
// document.all("EnginTypeName").value=tPropEntry[0][11];
// document.all("PremCalMode").value=tPropEntry[0][12];
// document.all("PremCalModeName").value=tPropEntry[0][13];
// document.all("PremFeeRate").value=tPropEntry[0][14];
// document.all("FirstPrem").value=tPropEntry[0][15];
// document.all("ContractorPeoples").value=tPropEntry[0][16];
// if(tPropEntry[0][17]=='1'){
// document.all("EnginCondition").checked='true';
// }
// if(tPropEntry[0][18]=='1'){
// document.all("SafeProve").checked='true';
// }
// }
// }
//银行信息初始化
function initEntry5(tGContNo){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql18");
// tSQLInfo.addSubPara(tGrpPropNo);
// var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if(kPropEntry==null||kPropEntry==''){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql17");
tSQLInfo.addSubPara(tGContNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
return false;
} else {
document.all("AccName").value=tPropEntry[0][0];
document.all("BankAccNo").value=tPropEntry[0][1];
document.all("PayType").value=tPropEntry[0][2];
document.all("PayTypeName").value=tPropEntry[0][3];
document.all("BankCode").value=tPropEntry[0][4];
document.all("BankCodeName").value=tPropEntry[0][5];
document.all("BankProvince").value=tPropEntry[0][6];
document.all("BankProvinceName").value=tPropEntry[0][7];
document.all("BankCity").value=tPropEntry[0][8];
document.all("BankCityName").value=tPropEntry[0][9];
document.all("AccAttributes").value=tPropEntry[0][10];
document.all("AccAttributesName").value=tPropEntry[0][11];
document.all("AccType2").value=tPropEntry[0][12];
document.all("AccTypeName2").value=tPropEntry[0][13];
document.all("BankAccSub2").value=tPropEntry[0][14];
}
// }else{
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql8");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tPropEntry==null) {
// return false;
// } else {
// document.all("BankCode").value=tPropEntry[0][0];
// document.all("BankCodeName").value=tPropEntry[0][1];
// document.all("BankProvince").value=tPropEntry[0][2];
// document.all("BankProvinceName").value=tPropEntry[0][3];
// document.all("BankCity").value=tPropEntry[0][4];
// document.all("BankCityName").value=tPropEntry[0][5];
// document.all("AccName").value=tPropEntry[0][6];
// document.all("BankAccNo").value=tPropEntry[0][7];
// document.all("PayType").value=tPropEntry[0][8];
// document.all("PayTypeName").value=tPropEntry[0][9];
// }
// }
}
//计价方式信息
// function initEntry12(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql15");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tPropEntry==null) {
// return false;
// } else {
// document.all("PricingMode").value=tPropEntry[0][0];
// document.all("PricingModeName").value=tPropEntry[0][1];
// }
// }
//发票信息
function initEntry13(tGContNo){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql45");
tSQLInfo.addSubPara(tGContNo);
var tTaxEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tTaxEntry==null) {
return false;
} else {
document.all("TaxFlag").value=tTaxEntry[0][0];
document.all("TaxFlagName").value=tTaxEntry[0][1];
document.all("TaxName").value=tTaxEntry[0][2];
document.all("TaxNo").value=tTaxEntry[0][3];
document.all("TaxBankName").value=tTaxEntry[0][4];
document.all("TaxBankAccNo").value=tTaxEntry[0][5];
document.all("TaxPhone").value=tTaxEntry[0][6];
document.all("TaxAddress").value=tTaxEntry[0][7];
document.all("IsElecInvoicePrint").value=tTaxEntry[0][8];
document.all("IsElecInvoicePrintName").value=tTaxEntry[0][9];
document.all("ElectInvoiceEmail").value=tTaxEntry[0][10];
document.all("fuli").value=tTaxEntry[0][11];
document.all("fuliName").value=tTaxEntry[0][12];
document.all("Taxpayer").value=tTaxEntry[0][13];
document.all("TaxpayerName").value=tTaxEntry[0][14];
document.all("Invoice").value=tTaxEntry[0][15];
document.all("InvoiceName").value=tTaxEntry[0][16];
}
}
//客户经理
function initEntry6(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql9");
tSQLInfo.addSubPara(tGrpPropNo);
turnPage1.queryModal(tSQLInfo.getString(), AgentDetailGrid, 1, 1);
if(!turnPage1.strQueryResult){
initAgentDetailGrid();
}
}
//业绩归属地
// function initEntry7(){
// divBusinessAreaInfo.style.display='';
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql10");
// tSQLInfo.addSubPara(tGrpPropNo);
// turnPage4.queryModal(tSQLInfo.getString(), BusinessAreaGrid, 1, 1);
//
// if(!turnPage4.strQueryResult){
// initBusinessAreaGrid();
// document.all("BusinessArea").checked='';
// divBusinessAreaInfo.style.display='none';
// }else{
// document.all("BusinessArea").checked='true';
// }
// }
//中介机构
function initEntry8(){
divAgentComInfo.style.display='';
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql11");
tSQLInfo.addSubPara(tGrpPropNo);
turnPage2.queryModal(tSQLInfo.getString(), AgentComGrid, 1, 1);
if(!turnPage2.strQueryResult){
initAgentComGrid();
document.all("AgentCom").checked='';
divAgentComInfo.style.display='none';
}else{
document.all("AgentCom").checked='true';
}
}
// //代理人
// function initEntry9(){
// divSalerInfo.style.display='';
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql12");
// tSQLInfo.addSubPara(tGrpPropNo);
// turnPage3.queryModal(tSQLInfo.getString(), SalerInfoGrid, 1, 1);
// if(!turnPage3.strQueryResult){
// initSalerInfoGrid();
// document.all("SalerInfo").checked='';
// divSalerInfo.style.display='none';
// }else{
// document.all("SalerInfo").checked='true';
// }
// }
//单位证件
function initEntry10(tGContNo){
// divIDInfo.style.display='';
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql13");
// tSQLInfo.addSubPara(tGContNo);
// turnPage5.queryModal(tSQLInfo.getString(), IDInfoGrid, 1, 1);
// if(!turnPage5.strQueryResult){
// initIDInfoGrid();
// document.all("IDInfo").checked='';
// divIDInfo.style.display='none';
// }else{
// document.all("IDInfo").checked='true';
// }
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql24");
tSQLInfo.addSubPara(tGContNo);
var tResu = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tResu!=null) {
document.all("GrpIDType").value=tResu[0][0];
document.all("GrpIDTypeName").value=tResu[0][1];
document.all("GrpID").value=tResu[0][2];
document.all("GrpIDStartDate").value=tResu[0][3];
document.all("GrpIDExpiryDate").value=tResu[0][4];
}
}
//多联系人
function initEntry11(tGContNo){
divLinkPeopleInfo.style.display='';
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql14");
tSQLInfo.addSubPara(tGContNo);
turnPage6.queryModal(tSQLInfo.getString(), TooContectGrid, 1, 1);
if(!turnPage6.strQueryResult){
initTooContectGrid();
document.all("TooContect").checked='';
divLinkPeopleInfo.style.display='none';
}else{
document.all("TooContect").checked='true';
}
}
/**
* 修改特别约定
*/
function upGrpSpec(){
// var modifySpec= prompt("请输入修改内容",document.all("GrpSpec").value);
// if (modifySpec != null && modifySpec != ""){
// document.all("GrpSpec").value=modifySpec;
// }
//导入修改投保客户信息保存必点校验
//导入投保信息投保单位客户号为000000,进行保存操作后更新为共享服务返回客户号
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_common");
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setSqlId("LCContSql230");
tSQLInfo.addSubPara(tGrpContNo);
var tSaveBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tSaveBtnFlag !=null){
alert("存在导入投保单位信息未保存,请点击保存按钮!");
return false;
}
DivNewGrpSpec.style.display='';
document.all("NewGrpSpec").value=document.all("GrpSpec").value;
}
/**
* 修改特别约定
*/
function upGrpSpecSubmit(){
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATEGRPSPEC?Operate=UPDATEGRPSPEC";
submitForm(fm,"UPDATEGRPSPEC",true);
}
/**
* 修改特别约定
*/
function initNewGrpSpec(){
DivNewGrpSpec.style.display='none';
document.all("NewGrpSpec").value="";
}
/**
* 保存投保人资料
*/
function saveClick(){
AgentDetailGrid.delBlankLine();
// BusinessAreaGrid.delBlankLine();
AgentComGrid.delBlankLine();
// SalerInfoGrid.delBlankLine();
// IDInfoGrid.delBlankLine();
TooContectGrid.delBlankLine();
clearAddress();
// if(!checkManageCom(document.all("ManageCom").value)){
// return false;
// }
trimBlank(fm);
if(!verifyInput()){
return false;
}
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql22");
// tSQLInfo.addSubPara(document.all("ManageCom").value);
// tSQLInfo.addSubPara("110000");
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// if (tPropEntry!=null && tPropEntry[0][0]=="1") {
// tBFFlag = "1";
// if(document.all("SocialInsuCode").value==''){
// i18nAlert("管理机构为北京分公司的保单【社会保险登记号】不能为空!", "LIS-01599");
// return false;
// }
// }else{
// tBFFlag = "0";
// }
if(relationbtn == 0) {
alert("请进行关联方模糊认定查询后,再进行下一步");
return false;
}
if(!checkPeriod()){
return false;
}
if ("1" === fm.RenewFlag.value){
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql21");
tSQLInfo.addSubPara(fm.RenewGrpContNo.value);
var tFlag11 = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tFlag11 == null ||tFlag11[0][0] != "1"){
alert("上一年度保单号不存在!");
return false;
}else {
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql20");
tSQLInfo.addSubPara(fm.RenewGrpContNo.value);
tSQLInfo.addSubPara(tCurrentDate);
var tCheckFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tCheckFlag == null || tCheckFlag[0][0] != "1") {
if(!confirm("上一年度保单" + fm.RenewGrpContNo.value + "不在续保期间!")){
return;
}
}
}
}
//校验客户经理信息
var tCount = AgentDetailGrid.mulLineCount;
var tMoney = 0;
if(parseInt(tCount)==0){
i18nAlert("请录入客户经理信息!", "LIS-01671");
return false;
}
if(parseInt(tCount)>0){
if(!AgentDetailGrid.checkValue("AgentDetailGrid")){
return false;
}
//是否业绩分摊为否只能录入一个业务员,反之必须录多个
if(document.all("IsDistribute").value=='0'&&tCount>1){
alert("是否业绩分摊为否,只能录入一个业务员");
document.all("IsDistribute").focus();
return false;
}
//是否业绩分摊为否只能录入一个业务员,反之必须录多个
if(document.all("IsDistribute").value=='1'&&tCount<2){
alert("是否业绩分摊为是,必须录入多个业务员");
document.all("IsDistribute").focus();
return false;
}
var mainAgentFlag=false;
for (var i=0; i1||AgentDetailGrid.getRowColData(i,4)<0){
i18nAlert("团险客户经理分佣比例必须大于等于0小于等于1", "LIS-99999");
return false;
}
}else{
if(AgentDetailGrid.getRowColData(i,4)>1||AgentDetailGrid.getRowColData(i,4)<=0){
i18nAlert("个险客户经理分佣比例必须大于0小于等于1", "LIS-99999");
return false;
}
}
}
var n=AgentDetailGrid.getRowColData(i,4).toString().split(".");
if(typeof(n[1])!="undefined"&&n[1].length>2){
i18nAlert("客户经理分佣比例小数点后只能输入两位", "LIS-99999");
return false;
}
for(var j=i+1;j0){
// if(!checkBusinessArea())
// return false;
// }
// 校验中介机构信息
AgentComGrid.delBlankLine();
var tComRow = AgentComGrid.mulLineCount;
if(document.all("SaleChnl").value=='02' ||document.all("SaleChnl").value=='03' || document.all("SaleChnl").value=='04'){
if(document.all("AgentCom").checked==false || tComRow<1){
i18nAlert("中介业务,请录入中介机构信息!", "LIS-01681");
return false;
}
}else {
if(tComRow>0){
alert("非中介业务,不需要录入中介机构信息!");
return false;
}
}
// var tComRate = 0;
if(document.all("AgentCom").checked){
if(!checkAgentCom()){
return false;
}
}
//增加销售渠道选择01、07、08时,针对业务员的校验 add by WH2020HXYWTX0291 团险2021年基本法改版需求 update by yzk 2021-10-21 begin (要)
if (fm.SaleChnl.value == "01") {
for (var i = 0; i < AgentDetailGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql175");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("销售渠道选择01时,业务人员只能是团险序列业务人员(不能是有团险工号的精准营销业务员)");
return false;
}
}
}else if(fm.SaleChnl.value == "07"){
for (var i = 0; i < AgentDetailGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql176");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("销售渠道选择07时,团险序列业务人员不能是有团险工号的精准营销业务员");
return false;
}
}
// var tlSql = " Select 1 From laagent Where agentcode = '" + fm.AgentCode.value + "' and (branchtype in ('1','4','9') or ( branchtype='2' and branchtype2<>'03'))";
// var lagentResult = easyExecSql(tlSql);
// if (lagentResult == null || lagentResult[0][0] == "") {
// alert("销售渠道选择07时,团险序列业务人员不能是有团险工号的精准营销业务员");
// return false;
// }
}
// 团险2021年基本法改版需求 update by yzk 2021-10-21 end
if (fm.SaleChnl.value == "08") {
for (var i = 0; i < AgentDetailGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql177");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("销售渠道选择08时,业务人员只能是精准营销序列业务人员");
return false;
}
}
// var tlSql = " Select 1 From laagent Where agentcode = '" + fm.AgentCode.value + "' and branchtype='2' and branchtype2='03'";
// var lagentResult = easyExecSql(tlSql);
// if (lagentResult == null || lagentResult[0][0] == "") {
// alert("销售渠道选择08时,业务人员只能是精准营销序列业务人员");
// return false;
// }
}
/* WH2021HXYWTX0560 add by njx 校验规则添加:“生成投保单时间不得早于业务人员执业证起期,不得晚于业务人员执行证止期” */
//业务员相关校验
for (var i = 0; i < AgentDetailGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql178");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
var laqualification = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (laqualification != null && laqualification[0][0] != "" && laqualification[0][1] != "") {
var startDate = laqualification[0][0];
var endDate = laqualification[0][1];
var thisAskPrtDate = tCurrentDate;
if (tFlag == '0') {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql179");
tSQLInfo.addSubPara(fm.GrpPropNo.value);
var askPrtMakeDate = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// var askPrtMakeDateSql = "select a.makedate from askprt a where a.askprtno = '" + fm.AskPrtNo.value + "'";
// var askPrtMakeDate = easyExecSql(askPrtMakeDateSql);
if (askPrtMakeDate != null && askPrtMakeDate[0][0] != "") {
thisAskPrtDate = askPrtMakeDate[0][0];
}
}
if (compareTwoDate(startDate, thisAskPrtDate) == 1) {
alert("生成投保单时间不得早于业务人员执业证起期");
return false;
}
if (compareTwoDate(thisAskPrtDate, endDate) == 1) {
alert("生成投保单时间不得晚于业务人员执行证止期");
return false;
}
}
}
if (fm.SaleChnl.value == "02" || fm.SaleChnl.value == "03"|| fm.SaleChnl.value == "04") {
if (AgentComGrid.mulLineCount <= 0) {
alert("请填写中介机构编码!");
return false;
}
var isboleanAgentCom = false;
for (var i = 0; i < AgentComGrid.mulLineCount; i++) {
if (AgentComGrid.getRowColData(i, 1) == '' || AgentComGrid.getRowColData(i, 1) == null){
isboleanAgentCom = true;
}else{
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql171");
tSQLInfo.addSubPara(AgentComGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
}else{
if (tPropEntry[0][0] == '1') {
alert("该中介机构已失效,请核实中介机构信息");
return false;
}
}
}
}
if(isboleanAgentCom){
alert("请填写中介机构编码!");
return false;
}
}
if ((fm.SaleChnl.value == "01" || fm.SaleChnl.value == "05" || fm.SaleChnl.value == "06")) {
if (AgentComGrid.mulLineCount > 0) {
alert("【中介机构编码】和【中介机构名称】必须为空!");
return false;
}
}
if (AgentComGrid.mulLineCount >= 0) {
//8611机构必填,现在是所有机构必填
// var tSql0 = " select 'X' FROM LDCODE where trim(CODETYPE)='baojianhui' and trim(code) =substr('" + fm.ManageCom.value + "',1,4)";
// var agentResult0 = easyExecSql(tSql0);
// if ((agentResult0 != null && agentResult0[0][0] != "") && (fm.AgentCode1.value == "" || fm.AgentName1.value == "")) {
// alert("中介机构销售人员代码 和 中介机构销售人员姓名 为必录字段");
// return false;
// }
for (var i = 0; i < AgentComGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql223");
tSQLInfo.addSubPara(tQuotNo);
var tPropEntry0 = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry0==null) {
}else{
if (tPropEntry0[0][0] === AgentComGrid.getRowColData(i, 1)) {
}else {
alert("询价录入中介机构为" + tPropEntry0[0][0] + ",中介机构录入需要和询价录入的中介机构一致!");
return false;
}
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql172");
tSQLInfo.addSubPara(AgentComGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
}else{
if (tPropEntry[0][0] == '1') {
alert("该中介机构已超过营业执照止期,请核实中介机构信息");
return false;
}
}
//增加对于中介协议已失效的,不能录入新单。 2012-05-16 zw
//如果机构是100380102就替换成1003801,这个机构比较特殊,临时方案,2014年10月8日 picmin
var agentcom = AgentComGrid.getRowColData(i, 1);
if (agentcom == '100380102') {
agentcom = '1003801';
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql173");
tSQLInfo.addSubPara(AgentComGrid.getRowColData(i, 1));
var tPropEntry1 = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry1==null) {
}else{
if (tPropEntry1[0][0] == '1') {
alert("该中介协议已超过生效止期,请核实中介协议信息。");
return false;
}
}
// var tSql2 = " select 1 from dual where not exists(select 'X' from lacont a, lacom b where a.agentcom='" + agentcom + "' and a.agentcom = b.agentcom and b.branchtype = '2' and nvl(a.EndDate,TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD') ) >=TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD') )";
// var agentResult2 = easyExecSql(tSql2);
// if (agentResult2 == "1") {
// alert("该中介协议已失效,请核实中介协议信息。");
// return false;
// }
}
}
if (AgentDetailGrid.mulLineCount >= 0) {
//8611机构必填,现在是所有机构必填
// var tSql0 = " select 'X' FROM LDCODE where trim(CODETYPE)='baojianhui' and trim(code) =substr('" + fm.ManageCom.value + "',1,4)";
// var agentResult0 = easyExecSql(tSql0);
// if ((agentResult0 != null && agentResult0[0][0] != "") && (fm.AgentCode1.value == "" || fm.AgentName1.value == "")) {
// alert("中介机构销售人员代码 和 中介机构销售人员姓名 为必录字段");
// return false;
// }
for (var i = 0; i < AgentDetailGrid.mulLineCount; i++) {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql174");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
}else{
if (tPropEntry[0][0] != '' || tPropEntry[0][0] != null) {
alert("业务员【" + tPropEntry[0][0] + "】已离职,请核实业务员信息。");
return false;
}
}
//对于北京机构的投保单,团险销售人员的资格证书已失效或无资格证书的,不能录入新单。 2012-05-16 zw
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql181");
tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i, 1));
tSQLInfo.addSubPara(fm.ManageCom.value);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
}else{
if (tPropEntry[0][0] == '1') {
alert("销售人员资格证已失效,无销售权限。");
return false;
}
}
// var tSql3 = " Select case when exists(select 'X' FROM LDCODE where trim(CODETYPE)='baojianhui' and trim(code) =substr('" + fm.ManageCom.value + "',1,4)) then (select 1 from dual where not exists(select 'X' From LAQualification where agentcode='" + fm.AgentCode.value + "' and (validend>=TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD') or validend is null))) else 0 end from dual";
// var agentResult3 = easyExecSql(tSql3);
// if (agentResult3 == "1") {
// alert("销售人员资格证已失效,无销售权限。");
// return false;
// }
}
}
// // 校验代理人信息
// SalerInfoGrid.delBlankLine();
// var tSalerRow =SalerInfoGrid.mulLineCount;
if (document.all("GrpIDType").value == '6'){
if (!validateUSCC(document.all("GrpID").value)) {
alert("统一社会信用代码格式不正确!");
return false;
}
}
var ttCurrentDate = document.all("tCurrentDate").value;
if(document.all("GrpIDStartDate").value !=''){
if(document.all("GrpIDStartDate").value>ttCurrentDate){
alert("单位证件有效起期不能晚于当前日期");
return false;
}
}
if(document.all("GrpIDExpiryDate").value !=''){
if(document.all("GrpIDExpiryDate").valuettCurrentDate){
alert("法人/负责人证件有效起期不能晚于当前日期");
return false;
}
}
if(document.all("CorIDExpiryDate").value !=''){
if(document.all("CorIDExpiryDate").valuettCurrentDate){
alert("经办人证件有效止期不能晚于当前日期");
return false;
}
}
if(document.all("IDEndDate").value !=''){
if(document.all("IDEndDate").value0){
// if(!checkIDInfo()){
// return false;
// }
// }
//校验多联系人信息
TooContectGrid.delBlankLine();
var tTooContectRow = TooContectGrid.mulLineCount;
if(document.all("TooContect").checked && tTooContectRow==0){
i18nAlert("请录入多联系人信息!", "LIS-01687");
return false;
}
if(document.all("TooContect").checked && tTooContectRow>0){
if(!checkTooContect())
return false;
}
// var bankFlag = 0;
// if(document.all("BankCode").value!=null || document.all("BankCode").value!=""){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContCommonSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContCommonSql9");
// tSQLInfo.addSubPara(document.all("BankCode").value);
// bankFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// }
//
// // 校验银行信息
// var tflag1 = false;
// if(bankFlag =='1'){
// if(document.all("BankCode").value=='' && document.all("BankProvince").value==''&& document.all("BankCity").value=='' && document.all("AccName").value=='' && trim(document.all("BankAccNo").value)==''){
// tflag1= true;
// }else if(document.all("BankCode").value !=''&& document.all("BankProvince").value!=''&& document.all("BankCity").value!='' && document.all("AccName").value!='' && trim(document.all("BankAccNo").value)!=''){
// tflag1= true;
// }else{
// tflag1=false;
// }
// }else {
// if(document.all("BankCode").value=='' && document.all("AccName").value=='' && trim(document.all("BankAccNo").value)==''){
// tflag1= true;
// }else if(document.all("BankCode").value !='' && document.all("AccName").value!='' && trim(document.all("BankAccNo").value)!=''){
// tflag1= true;
// }else{
// tflag1=false;
// }
// }
//
// if(tflag1==false){
// i18nAlert("请填写银行相关信息!", "LIS-03014");
// return false;
// }
//
// if(tContPlanType=='01'){
// if(!checkEngInfo()){
// return false;
// }
// } else if(tContPlanType=='02'){
//
// if (document.all("PayintvType").value!="-1") {
// i18nAlert("账户型保单缴费方式只能选择不定期缴!", "LIS-01688");
// return false;
// }
//
// //if(isEmpty(fm.PricingMode)){
// //i18nAlert("计价方式不能为空!", "LIS-01689");
// //return false;
// //}
// }
// if(!checkPayType()){
// return false;
// }
//
// if(document.all("GrpSpec").value.length>1500){
// i18nAlert("保单特别约定录入过长,请录入1500字符以内!", "LIS-03919");
// return false;
// }
//
// if(!checkSale()){
// return false;
// }
// if (document.all("ProvinceCode").value!=null && document.all("ProvinceCode").value!="") {
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql22");
// tSQLInfo.addSubPara(document.all("ManageCom").value);
// tSQLInfo.addSubPara(document.all("ProvinceCode").value);
// var tProvinceArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
///* if (tProvinceArr==null) {
// if (!i18nConfirm("承保机构与投保地址不符,是否确定?", "LIS-00873")) {
// return false;
// }
// }*/
// }
// if(!CheckPTOtherInput()){
// return false;
// }
// if(document.all("InstScateGory").value=="3"&&document.all("TaxrStatus").value!="4"){
// i18nAlert("当机构类别为免尽职调查机构时,机构税收居民身份只能为免尽职调查对象!", "LIS-01690");
// return false;
// }
if (fm.BankCode.value != "" && fm.BankCode.value != null) {
if (fm.AccName.value == "" || fm.BankAccNo.value == "" || fm.BankProvince.value == "" || fm.BankCity.value == "") {
alert("开户银行不为空时,【开户名】,【银行账号】,【开户行所在省】,【开户行所在市】为必录项");
return false;
}
}
if (fm.BankCode.value =="" || fm.BankCode.value==null){
if (fm.AccName.value != "" || fm.BankAccNo.value != "" || fm.BankProvince.value != "" || fm.BankCity.value != "") {
alert("开户银行为空时,【开户名】,【银行账号】,【开户行所在省】,【开户行所在市】无需录入");
return false;
}
}
//电子发票打印时电子发票接收邮箱必录
if (fm.IsElecInvoicePrint.value !="" && fm.IsElecInvoicePrint.value !=null && fm.IsElecInvoicePrint.value == "0"){
if (fm.ElectInvoiceEmail.value == "" || fm.ElectInvoiceEmail.value == null) {
alert("需要打印电子发票时,电子发票接收邮箱不可为空!");
return false;
}
}
if (!LcgrpcontPolCheck()) {
return false;
}
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/INSERT?Operate=INSERT";
submitForm(fm,"INSERT",true);
}
//校验中介机构是否和销售部门销售类型销售渠道相符
// function checkSale(){
//
// var tAgentComRow = AgentComGrid.mulLineCount;
// for(var i=0;i dateStr2 ? 1 : 0;
}
function TaxNoCheck(IDno) {
var myreg = /^[a-zA-Z0-9]*$/;
if (!myreg.test(IDno) ||
!(IDno.length == 18) ||
!myreg.test(fm.TaxNo.value) ||
!(fm.TaxNo.value.length == 18)) {
alert("税务登记证及纳税人识别号不符合规则,应由字母数字组成,位数为18位!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql170");
tSQLInfo.addSubPara(IDno);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("税务登记证及纳税人识别号前两位应以11,12,13,19,21,29,31,32,33,34,35,39,41,49,51,52,53,59,61,62,69,71,72,79,81,89,91,92,93,A1,A9,N1,N2,N3,N9,Y1,54,55,37,G1 之一开头!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql170");
tSQLInfo.addSubPara(fm.TaxNo.value);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("税务登记证及纳税人识别号前两位应以11,12,13,19,21,29,31,32,33,34,35,39,41,49,51,52,53,59,61,62,69,71,72,79,81,89,91,92,93,A1,A9,N1,N2,N3,N9,Y1,54,55,37,G1 之一开头!");
return false;
}
// var rsNS11 = easyExecSql(sqlNS11, 1, 0);
// var rsNS12 = easyExecSql(sqlNS12, 1, 0);
// if (rsNS11 == null || rsNS12 == null) {
// alert("统一社会信用代码及纳税人识别号前两位应以11,12,13,19,21,29,31,32,33,34,35,39,41,49,51,52,53,59,61,62,69,71,72,79,81,89,91,92,93,A1,A9,N1,N2,N3,N9,Y1,54,55,37,G1 之一开头!");
// return false;
// }
// var sqlNS21="select 1 from dual where substr('"+fm.TaxRegNo.value+"',3,6) "
// +"in (select trim(code) from ldcode where codetype= 'divisionCode')";
//
// var sqlNS22="select 1 from dual where substr('"+fm.TaxpayerNo.value+"',3,6) "
// +"in (select trim(code) from ldcode where codetype= 'divisionCode')";
//
// var rsNS21 = easyExecSql(sqlNS21, 1, 0);
// var rsNS22 = easyExecSql(sqlNS22, 1, 0);
// if( rsNS21 == null || rsNS22 == null ){
// alert("统一社会信用代码及纳税人识别号第3到第8位应为行政区代码,请核实");
// return false;
// }
return true;
}
/**
* 导入投保单位
*/
function impGrpAppntSubmit() {
if (tGrpContNo == null || tGrpContNo == "") {
alert("获取投保单号失败!");
return false;
}
var filePath = fm.UploadPath.value;
if(filePath == null || filePath == ""){
i18nAlert("请选择导入文件路径!", "LIS-03339");
return false;
}
var indexFirst = filePath.lastIndexOf("\\");
var indexLast = filePath.lastIndexOf(".xlsx");
if(indexFirst < 0 || indexLast < 0 || indexLast <= indexFirst) {
i18nAlert("文件路径不合法或选择的文件格式不正确,请重新选择!", "LIS-03340");
return false;
}
var i = 0;
var showStr = i18nMessage("正在导入,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04817");
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.enctype='multipart/form-data';
fm.encoding='multipart/form-data';
fm.action="../API/grp_nb/g_app/LCGrpContImpSave/UPLOAD1?ImpOperate=UPLOAD&GrpContNo="+tGrpContNo+"&ManageCom="+fm.ManageCom.value;
// fm.action="../API/grp_quotation/g_quot/LQuotPlanImpSave/UPLOAD1?ImpOperate=UPLOAD&QuotNo="+tGrpContNo;
ajaxSubmit2(document.getElementById("fm"), afterImpSubmit, true);
}
/**
* 提交数据后返回操作
*/
function afterImpSubmit(FlagStr, content) {
fm.enctype='application/x-www-form-urlencoded';
fm.encoding='application/x-www-form-urlencoded';
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();
initEntry1(tGrpContNo);
initEntry2(tGrpContNo);
initEntry3(tGrpContNo);
initEntry5(tGrpContNo);
initEntry10(tGrpContNo);
initEntry11(tGrpContNo);
initEntry13(tGrpContNo);
}
}
function checkTooContect(){
if(!TooContectGrid.checkValue("TooContectGrid")){
return false;
}
var tTooContectRow = TooContectGrid.mulLineCount;
for(var i=0;itCurrentDate){
alert("联系人证件有效起期不能大于当前日期!");
return false;
}
}
if(TooContectGrid.getRowColData(i,9)!=null&&TooContectGrid.getRowColData(i,9)!=''){
if(TooContectGrid.getRowColData(i,9)ttCurrentDate){
i18nAlert(IDInfoGrid.getRowColData(i,2)+"证件有效起期不能晚于当前日期!", "LIS-99999");
return false;
}
}
if(IDInfoGrid.getRowColData(i,5)!=null&&IDInfoGrid.getRowColData(i,5)!=''){
if(IDInfoGrid.getRowColData(i,5)1||BusinessAreaGrid.getRowColData(i,3)<=0){
// i18nAlert("业绩归属地【归属比例】必须大于0小于1", "LIS-01817");
// return false;
// }
//
// var n=BusinessAreaGrid.getRowColData(i,3).toString().split(".");
//
// if(typeof(n[1])!="undefined"&&n[1].length>2){
// i18nAlert("业绩归属地【归属比例】小数点后只能输入两位", "LIS-01818");
// return false;
// }
//
// if(BusinessAreaGrid.getRowColData(i,4)==null||BusinessAreaGrid.getRowColData(i,4)==''){
// i18nAlert("请输入业绩归属地【归属地客户经理代码】!", "LIS-01819");
// return false;
// }
//
// if(BusinessAreaGrid.getRowColData(i,6)==null||BusinessAreaGrid.getRowColData(i,6)==''){
// i18nAlert("请输入业绩归属地【分佣比例】!", "LIS-01820");
// return false;
// }
//
// if(BusinessAreaGrid.getRowColData(i,6)>1||BusinessAreaGrid.getRowColData(i,6)<=0){
// i18nAlert("业绩归属地归属【分佣比例】必须大于0小于1", "LIS-01821");
// return false;
// }
//
// var n=BusinessAreaGrid.getRowColData(i,6).toString().split(".");
//
// if(typeof(n[1])!="undefined"&&n[1].length>2){
// i18nAlert("业绩归属地归属【分佣比例】小数点后只能输入两位", "LIS-01822");
// return false;
// }
// for(var j=i+1;j1||SalerInfoGrid.getRowColData(i,4)<=0){
// i18nAlert("代理人【分佣比例】必须大于0小于1", "LIS-01829");
// return false;
// }
//
// var n=SalerInfoGrid.getRowColData(i,4).toString().split(".");
//
// if(typeof(n[1])!="undefined"&&n[1].length>2){
// i18nAlert("代理人【分佣比例】小数点后只能输入两位", "LIS-01830");
// return false;
// }
//
// for(var j=i+1;j0 && document.all("CorIDType").value=="") {
i18nAlert("请先选择证件类型!", "LIS-00574");
return false;
}
if(document.all("CorIDType").value=="0"&&document.all("CorID").value.length>0) {
if((document.all("CorID").value.length!=15) &&(document.all("CorID").value.length!=18)){
i18nAlert("输入的身份证号位数错误", "LIS-00575");
document.all('CorID').value="";
return false;
}
if(!checkIdCard(document.all("CorID").value)) {
i18nAlert("身份证号码不合法", "LIS-01833") ;
document.all('CorID').value="";
document.all('CorID').className = "warn";
return false;
}
}
}
function checkCoridtype2(){
if(document.all("CorID1").value.length>0 && document.all("CorIDType1").value=="") {
i18nAlert("请先选择证件类型!", "LIS-00574");
return false;
}
if(document.all("CorIDType1").value=="0"&&document.all("CorID1").value.length>0) {
if((document.all("CorID1").value.length!=15) &&(document.all("CorID1").value.length!=18)){
i18nAlert("输入的身份证号位数错误", "LIS-00575");
document.all('CorID1').value="";
return false;
}
if(!checkIdCard(document.all("CorID1").value)) {
i18nAlert("身份证号码不合法", "LIS-01833") ;
document.all('CorID1').value="";
document.all('CorID1').className = "warn";
return false;
}
}
}
function checkCity(){
var ManageCom =document.all('ManageCom').value;
var ProvinceCode =document.all('ProvinceCode').value;
var CityCode =document.all('CityCode').value;
var CountyCode =document.all('CountyCode').value;
if(tBFFlag=="1"){
if(ProvinceCode ==''){
i18nAlert("北京保单联系地址(省级)不能为空!", "LIS-01834");
document.all("ProvinceName").focus();
return false;
}
if(CityCode =="" ){
i18nAlert("北京保单联系地址(地级)不能为空", "LIS-01835");
return false;
}
if(CountyCode =="" ){
i18nAlert("北京保单联系地址(县级)不能为空", "LIS-01836");
return false;
}
}
if(ProvinceCode !=""){
if(CityCode ==''){
CityCode ='0';
}
if(CountyCode ==''){
CountyCode ='0';
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCPropEntrySql");
tSQLInfo.setModule("grp_nb");
tSQLInfo.setSqlId("LCPropEntrySql10");
tSQLInfo.addSubPara(ProvinceCode);
tSQLInfo.addSubPara(CityCode);
tSQLInfo.addSubPara(CountyCode);
var arrResult = easyExecSql(tSQLInfo.getString());
if(arrResult==null || arrResult =='0'){
i18nAlert("联系地址不存在或者关联不正确", "LIS-03657");
return false;
}
}
return true;
}
function checkidtype(){
if(document.all("IDNo").value.length>0 && document.all("IDType").value=="") {
i18nAlert("请先选择证件类型!", "LIS-00574");
return false;
}
if(document.all("IDType").value=="0"&&document.all("IDNo").value.length>0) {
if((document.all("IDNo").value.length!=15) &&(document.all("IDNo").value.length!=18)){
i18nAlert("输入的身份证号位数错误", "LIS-00575");
document.all('IDNo').value="";
return false;
}
if(!checkIdCard(document.all("IDNo").value)) {
i18nAlert("身份证号码不合法", "LIS-01833") ;
document.all('IDNo').value="";
document.all('IDNo').className = "warn";
return false;
}
}
}
/**
* 返回
**/
function turnBack(){
/**if(tFlag=='0'){
top.parent.location.href = "./LCGrpContListInput.jsp";
} else if(tFlag=='1'){
top.parent.location.href = "./LCGrpApproveListInput.jsp";
}**/
top.close();
top.opener.querySelfClick();
}
/**
* 模拟下拉操作
*/
function returnShowCodeList(value1, value2, value3) {
returnShowCode(value1, value2, value3, '0');
}
function returnShowCodeListKey(value1, value2, value3) {
returnShowCode(value1, value2, value3, '1');
}
function returnShowCode(value1, value2, value3, returnType) {
if (value1=='city') {
if (isEmpty(fm.ProvinceName)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
var tProvince = document.all("ProvinceCode").value;
if (returnType=='0') {
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
} else {
return showCodeListKey('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
}
}else if (value1=='Linkcity') {
if (isEmpty(fm.LinkProvinceCode2)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
var tProvince = document.all("LinkProvinceCode2").value;
if (returnType=='0') {
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
} else {
return showCodeListKey('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
}
}else if (value1=='bankcity') {
if (isEmpty(fm.BankProvinceName)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
var tProvince = document.all("BankProvince").value;
if (returnType=='0') {
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
} else {
return showCodeListKey('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 = document.all("CityCode").value;
if (returnType=='0') {
return showCodeList('district',value2,value3,null,tCity,'UpPlaceName','1',180);
} else {
return showCodeListKey('district',value2,value3,null,tCity,'UpPlaceName','1',180);
}
}else if (value1=='Linkdistrict') {
if (isEmpty(fm.LinkProvinceCode2)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
if (isEmpty(fm.LinkCityCode2)) {
i18nAlert("请选择市!", "LIS-00796");
return false;
}
var tCity = document.all("LinkCityCode2").value;
if (returnType=='0') {
return showCodeList('district',value2,value3,null,tCity,'UpPlaceName','1',180);
} else {
return showCodeListKey('district',value2,value3,null,tCity,'UpPlaceName','1',180);
}
} else if (value1=='bankprovince') {
var tSql = "1";
if (returnType=='0') {
return showCodeList('province',value2,value3,null,tSql,1,'1',180);
} else {
return showCodeListKey('province',value2,value3,null,tSql,1,'1',180);
}
} else if (value1=="agenttype") {
// if (isEmpty(fm.ChnlType)) {
// if (returnType=='0') {
// return showCodeList('agenttype',value2,value3);
// } else {
// return showCodeListKey('agenttype',value2,value3);
// }
// }
// var tChnlType = document.all("ChnlType").value;
// if (returnType=='0') {
// return showCodeList('queryexp',value2,value3,null,['agenttype',tChnlType],['CodeType','CodeExp'],'1',180);
// } else {
// return showCodeListKey('queryexp',value2,value3,null,['agenttype',tChnlType],['CodeType','CodeExp'],'1',180);
// }
}else if (value1=="comcodeall") {
if (returnType=='0') {
return showCodeList('comcodeall',value2,value3,null,['03',tManageCom],['ComGrade','ManageCom'],'1',180);
} else {
return showCodeListKey('comcodeall',value2,value3,null,['03',tManageCom],['ComGrade','ManageCom'],'1',180);
}
}
}
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 afterSubmit(FlagStr, content,filepath) {
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();
if("SAVEPOLICY"==mOperate || "SAVEAPPROVE"==mOperate || "GoToContInput"==mOperate){
turnBack();
}else if("INSERT"==mOperate){
initForm();
}
else if("PRINTPRT"==mOperate){
// window.location = encodeURI("../API/grp_common/jsp/download/APIDOWNLOAD?FilePath="+ filepath +"&FileName=" + tGrpPropNo+".pdf")
document.all("PrintPtrBtn").disabled=false;
} else if("SUBMIT"==mOperate ){
top.opener.initForm();
top.close();
}else if("UPDATEGRPSPEC"==mOperate){
initForm();
}
}
}
function submitForm(obj, tOperate, dynamic) {
submitFunc();
mOperate = tOperate;
// obj.submit();
if(dynamic != null && dynamic === true){
ajaxSubmit(obj);
} else {
ajaxSubmit2(obj);
}
}
function resultAfterSubmit(FlagStr,Content,result) {
afterSubmit(FlagStr, Content, result.filepath);
}
//工程明细
// function showInfoEngin(){
// document.all("divEnginFactor").innerHTML = showPlanDiv();
// }
// function showPlanDiv() {
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql2");
// tSQLInfo.addSubPara(tGrpPropNo);
//
// var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// if(tArr!=null){
// var tElementCode;//因子编码
// var tElementName;//因子名称
// var tControlFlag;//是否有录入框
// var tIsSelected;//借用quotno来判断该因子值是否在询价特约表中
// var tOElementValue;//原始值
// var tNElementValue;//询价值
//
// //var tInnerHTML0 = " | | | | | |
";
// var tInnerHTML0 = "";
// tInnerHTML0 = tInnerHTML0+tInnerHTML1;
//
// return tInnerHTML0;
// }
// }
//
// function checkEngInfo(){
// if(isEmpty(fm.EnginName)){
// i18nAlert("工程名称不能为空!", "LIS-01837");
// return false;
// }
// if(isEmpty(fm.ContractorName)){
// i18nAlert("施工方名称不能为空!", "LIS-01838");
// return false;
// }
// if(isEmpty(fm.ContractorType)){
// i18nAlert("施工方资质不能为空!", "LIS-01839");
// return false;
// }
// if(isEmpty(fm.EnginPlace)){
// i18nAlert("工程地点不能为空!", "LIS-01840");
// return false;
// }
// if(!checkNumber(fm.EnginCost)){
// i18nAlert("工程造价必须为数字!", "LIS-01841");
// return false;
// }
// if(!checkNumber(fm.EnginArea)){
// i18nAlert("建筑面积必须为数字!", "LIS-01842");
// return false;
// }
// if(isEmpty(fm.EnginType)){
// i18nAlert("工程类型不能为空!", "LIS-01843");
// return false;
// }
// if(isEmpty(fm.PremCalMode)){
// i18nAlert("保费计算方式不能为空!", "LIS-01844");
// return false;
// }
// if("1"==document.all("PremCalMode").value){
// if(document.all("PremFeeRate").value!=null && document.all("PremFeeRate").value!="" && !isNumeric(document.all("PremFeeRate").value)){
// i18nAlert("保险费率必须为有效数字!", "LIS-01845");
// return false;
// }
// } else if("2"==document.all("PremCalMode").value){
// if(isEmpty(fm.PremFeeRate)){
// i18nAlert("保险费率不能为空!", "LIS-01846");
// return false;
// }
// if(!isNumeric(document.all("PremFeeRate").value)){
// i18nAlert("保险费率必须为有效数字!=", "LIS-01847");
// return false;
// }
// if(document.all("PremFeeRate").value.length >=7){
// i18nAlert("保险费率长度不能超过6位!", "LIS-01848");
// return false;
// }
// //modify by dianj 20141128申请去掉校验
// /**var valuefee = document.all("EnginCost").value*document.all("PremFeeRate").value/1000;
// if(valuefee>document.all("SumPrems").value){
// i18nAlert("按照保险费率所算出的保费应小于等于总保费!", "LIS-01849");
// return false;
// }**/
//
// } else if("3"==document.all("PremCalMode").value){
// if(isEmpty(fm.PremFeeRate)){
// i18nAlert("保险费率长度不能为空!", "LIS-01850");
// return false;
// }
// if(document.all("PremFeeRate").value.length>=7){
// i18nAlert("保险费率长度不能超过6位", "LIS-01851");
// return false;
// }
// if(!isNumeric(document.all("PremFeeRate").value)){
// i18nAlert("保险费率必须为有效数字!", "LIS-01845");
// return false;
// }
// //modify by dianj 20141128申请去掉校验
// /**var valuefee = document.all("EnginArea").value*document.all("PremFeeRate").value;
// if(valuefee>document.all("SumPrems").value){
// i18nAlert("按照保险费率所算出的保费应小于等于总保费!", "LIS-01849");
// return false;
// }**/
// }
// if(isEmpty(fm.FirstPrem)){
// i18nAlert("趸交保费不能为空!", "LIS-01981");
// return false;
// }
// if(!checkNumber(fm.FirstPrem)){
// i18nAlert("趸交保费必须为有效数字!", "LIS-01982");
// return false;
// }
// if(isEmpty(fm.ContractorPeoples)){
// i18nAlert("施工人数不能为空!", "LIS-01983");
// return false;
// }
// if(!checkNumber(fm.ContractorPeoples)){
// i18nAlert("施工人数必须为有效数字!", "LIS-01984");
// return false;
// }
// return true;
// }
function goToChargeFee(){
// var tChnlType = document.all("ChnlType").value;
window.open("./LCGrpChargeFeeMain.jsp?GrpPropNo="+tGrpPropNo+"&Flag="+tFlag,"中介手续费维护",'height=400,width=1000,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function goToBalance(){
window.open("./LCBalanceOnMain.jsp?GrpPropNo="+tGrpPropNo+"&Flag="+tFlag,"定期结算维护",'height=300,width=1100,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function afterCodeSelect(o, p){
// var tcode = document.all("SaleChnl").value;
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql16");
// tSQLInfo.addSubPara(tcode);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tPropEntry==null) {
// return false;
// }else{
// if(o=='agenttype'){
// if(p.value==tcode){
// document.all("ChnlType").value=tPropEntry[0][0];
// document.all("ChnlTypeName").value=tPropEntry[0][1];
// }
// }
// }
// if(o=='salechannel'){
// document.all("SaleChnl").value='';
// document.all("SaleChnlName").value='';
// }
if(o=='valdatetype'){
if(document.all("ValDateType").value=='0'){
document.all("ValDate").value='';
valDatename.style.display="none";
valDatename1.style.display="none";
}else if(document.all("ValDateType").value=='1'){
valDatename.style.display="";
valDatename1.style.display="";
}
}
if(o=='IfError'){
if(document.all("IfError").value=='0'){
document.all("LoseScores").value='';
document.getElementById("LoseScores").readOnly=true;
document.all("ErrorDetails").value='';
document.getElementById("ErrorDetails").readOnly=true;
}else if(document.all("IfError").value=='1'){
document.getElementById("LoseScores").readOnly=false;
document.getElementById("ErrorDetails").readOnly=false;
}
}
// if(o=='comcodeall'){
// if(p.name == "BusinessAreaGrid1") {
// var rowNumber = BusinessAreaGrid.lastFocusRowNo;
// BusinessAreaGrid.setRowColData(rowNumber, 4, "");
// BusinessAreaGrid.setRowColData(rowNumber, 5, "");
// BusinessAreaGrid.setRowColData(rowNumber, 6, "");
// }
// }
if(o=="province"){
if(p.name=="BankProvince"){
document.all("BankCity").value="";
document.all("BankCityName").value="";
} else if(p.name=="LinkProvince2"){
document.getElementById("LinkCityCode2").value="";
document.getElementById("LinkCity2").value="";
document.getElementById("LinkCounty2").value="";
document.getElementById("LinkCountyCode2").value="";
} else {
document.all("CityCode").value="";
document.all("CityName").value="";
document.all("CountyName").value="";
document.all("CountyCode").value="";
}
} else if(o=="city"){
if(p.name=="LinkCity2"){
document.getElementById("LinkCounty2").value="";
document.getElementById("LinkCountyCode2").value="";
} else if(p.name=="CityName"){
document.all("CountyName").value="";
document.all("CountyCode").value="";
}
}
if(o=="trueflag"){
if(p.name=="RenewFlag" && p.value=='0'){
document.all("RenewGrpContNo").value="";
}
}
// if(o=="institutionscategory"){
// if(p.value=="3"){
// document.all("TaxrStatus").value="4";
// showOneCodeName('taxresidentstatus','TaxrStatus','TaxrStatusName');
// document.all("TaxrStatus").disabled = true;
// document.all("TaxrStatusName").readOnly = true;
// }else{
// document.all("TaxrStatus").disabled = false;
// document.all("TaxrStatusName").readOnly = false;
// document.all("TaxrStatus").value = "";
// document.all("TaxrStatusName").value = "";
// }
// }
// if(o=="controltaxresidentstype"){
// if(p.value=="2"||p.value=="3"){
// showContTarxQuery();
// }
// }
// if(o=="taxresidentstatus"){
// if(p.value=="2"||p.value=="3"){
// showTarxQuery();
// }
// }
// if(o=="taxresidentstype"){
// if(p.value=="2"||p.value=="3"){
// showTaxrInfo();
// }
// }
}
function dealAfterSelete(){
if (document.all("PolicyAppDate").value > tCurrentDate){
alert("投保申请日期不能大于当前日期!");
document.all("PolicyAppDate").value = "";
}
if ("1"==document.all("ValDateType").value){
if(document.all("ValDate").value==null||document.all("ValDate").value==""||document.all("ValDate").value==undefined){
document.all("PolicyAppDate").value ="";
}else{
if(document.all("ValDate").value > tCurrentDate) {
}else{
var ValDate = new Date(document.all("ValDate").value);
var PolicyAppDate =new Date(ValDate-1*60*60*24*1000);
var year = PolicyAppDate.getFullYear().toString().padStart(4,"0");
var month = (PolicyAppDate.getMonth()+1).toString().padStart(2,"0");
var day = PolicyAppDate.getDate().toString().padStart(2,"0");
document.all("PolicyAppDate").value =year+"-"+month+"-"+day;
}
}
}
}
function dealPolicyAppDate(){
if ("1"==document.all("ValDateType").value){
if(document.all("ValDate").value==null||document.all("ValDate").value==""||document.all("ValDate").value==undefined){
}else{
var ValDate = new Date(document.all("ValDate").value);
if(document.all("ValDate").value > tCurrentDate) {
if (document.all("PolicyAppDate").value==null||document.all("PolicyAppDate").value==""||document.all("PolicyAppDate").value==undefined||document.all("PolicyAppDate").value > tCurrentDate) {
document.all("PolicyAppDate").value = tCurrentDate;
}
}else{
var PolicyAppDate =new Date(ValDate-1*60*60*24*1000);
var year = PolicyAppDate.getFullYear().toString().padStart(4,"0");
var month = (PolicyAppDate.getMonth()+1).toString().padStart(2,"0");
var day = PolicyAppDate.getDate().toString().padStart(2,"0");
document.all("PolicyAppDate").value =year+"-"+month+"-"+day;
}
}
}else if ("0"==document.all("ValDateType").value){
document.all("ValDate").value='';
valDatename.style.display="none";
valDatename1.style.display="none";
}
}
//税收居民类型显示
function showTarxQuery(){
var BussType="GTB";
var SubType="GTB1077";
window.open("./LCGrpTaxrInputMain.jsp?ButtonFlag=2&GrpPropNo="+tGrpPropNo+"&BussType="+BussType+"&SubType="+SubType,"",sFeatures);
}
function showContTarxQuery(){
var BussType="GTB";
var SubType="GTB1075";
window.open("./LCGrpSpTaxrInputMain.jsp?ButtonFlag=2&GrpPropNo="+tGrpPropNo+"&BizType="+BussType+"&SubType="+SubType,"",sFeatures);
}
function showTaxrInfo(){
var BussType="GTB";
var SubType="GTB1076";
window.open("../app/LCTaxr.jsp?QYFlag=3&LoadFlag=3&PrtNo="+tGrpPropNo+"&BizType="+BussType+"&SubType="+SubType,"",sFeatures);
}
function savePolicyClick(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql31");
// tSQLInfo.addSubPara(tCurrentDate);
// tSQLInfo.addSubPara(tGrpPropNo);
// var tRelaName = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tRelaName!=null && tRelaName[0][0]=="1") {
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql32");
// tSQLInfo.addSubPara(tCurrentDate);
// tSQLInfo.addSubPara(tGrpPropNo);
// var tRelaE = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tRelaE!=null && tRelaE[0][0]=="1"){
// i18nAlert("此交易为重大关联交易,请关注是否完成审批!", "LIS-01985");
// //return false;
// }else {
// i18nAlert("此交易为一般关联交易,请关注是否完成审批!", "LIS-01986");
// //return false;
// }
// }
// if(AgentDetailGrid.mulLineCount>2){
// if(i18nConfirm("机构存在客户经理多于2个,是否通过?", "LIS-00875")){
// document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?Operate=SAVEPOLICY";
// document.all("Operate").value = "SAVEPOLICY";
// submitForm(fm,"SAVEPOLICY",true);
// }else{
// return false;
// }
// }else{
// document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?Operate=SAVEPOLICY";
// document.all("Operate").value = "SAVEPOLICY";
// submitForm(fm,"SAVEPOLICY",true);
// }
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql14");
tSQLInfo.addSubPara(tGrpPropNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tArrCom == null){
alert("请先打印投保单");
return false;
}else{
if (tArrCom[0][0] != 1) {
alert("请先打印投保单");
return false;
}
}
//导入修改投保客户信息保存必点校验
//导入投保信息投保单位客户号为000000,进行保存操作后更新为共享服务返回客户号
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_common");
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setSqlId("LCContSql230");
tSQLInfo.addSubPara(tGrpContNo);
var tSaveBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tSaveBtnFlag !=null){
alert("存在导入投保单位信息未保存,请点击保存按钮!");
return false;
}
//人名清单确认是否点击校验
//0 必须点击人名清单确认;1 点击之后置1;非0、1,即复核或人核退回投保单,操作人员变更后会置0
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql16");
tSQLInfo.addSubPara(tGrpContNo);
var tBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tBtnFlag !=null && tBtnFlag != "" && tBtnFlag =="0"){
alert("请点击被保险人清单维护界面的人员清单确认按钮!");
return false;
}
if(fm.InsuPeriodFlag.value == "Y" &&fm.InsuPeriod.value != 1){
alert("保险期限单位为年,保险期限数值应为1");
return false;
}
if(fm.InsuPeriodFlag.value == "M" && (fm.InsuPeriod.value < 1 || fm.InsuPeriod.value > 12)){
alert("保险期限单位为月,保险期限数值应为1~12");
return false;
}
if(fm.InsuPeriodFlag.value == "D" && (fm.InsuPeriod.value < 1 || fm.InsuPeriod.value > 365)){
alert("保险期限单位为日,保险期限数值应为1~365");
return false;
}
//校验询价单是否已过期
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql6");
tSQLInfo.addSubPara(tQuotNo);
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArr ==null){
alert("查询询价有效期信息失败")
return false;
}else {
if (tArr[0][0] = 46) {
fm.IDExpDate.value = '9999-01-01';
}
}
if (fm.CorIDType.value == '0' && type == "CorIDType") {
var tapage = getAgeFromIdCard(fm.CorID.value,fm.CorIDStartDate.value);
if (tapage < 16) {
var tyear = caldateYear(fm.CorIDStartDate.value, 5);
fm.CorIDExpiryDate.value = tyear;
}
if (16 <= tapage && tapage <= 25) {
var tyear = caldateYear(fm.CorIDStartDate.value, 10);
fm.CorIDExpiryDate.value = tyear;
}
if (26 <= tapage && tapage <= 45) {
var tyear = caldateYear(fm.CorIDStartDate.value, 20);
fm.CorIDExpiryDate.value = tyear;
}
if (tapage >= 46) {
fm.CorIDExpiryDate.value = '9999-01-01';
}
}
}
function calEndDate2(code, type) {
if (fm.IDType.value == '0' && type == "IDType1") {
var tapage = getAgeFromIdCard(fm.IDNo.value,fm.IDStartDate.value);
if (tapage < 16) {
var tyear = caldateYear(fm.IDStartDate.value, 5);
fm.IDEndDate.value = tyear;
}
if (16 <= tapage && tapage <= 25) {
var tyear = caldateYear(fm.IDStartDate.value, 10);
fm.IDEndDate.value = tyear;
}
if (26 <= tapage && tapage <= 45) {
var tyear = caldateYear(fm.IDStartDate.value, 20);
fm.IDEndDate.value = tyear;
}
if (tapage >= 46) {
fm.IDExpDate.value = '9999-01-01';
}
}
if (fm.CorIDType.value == '0' && type == "CorIDType") {
var tapage = getAgeFromIdCard(fm.CorID.value,fm.CorIDStartDate.value);
if (tapage < 16) {
var tyear = caldateYear(fm.CorIDStartDate.value, 5);
fm.CorIDExpiryDate.value = tyear;
}
if (16 <= tapage && tapage <= 25) {
var tyear = caldateYear(fm.CorIDStartDate.value, 10);
fm.CorIDExpiryDate.value = tyear;
}
if (26 <= tapage && tapage <= 45) {
var tyear = caldateYear(fm.CorIDStartDate.value, 20);
fm.CorIDExpiryDate.value = tyear;
}
if (tapage >= 46) {
fm.CorIDExpiryDate.value = '9999-01-01';
}
}
}
function getAgeFromIdCard(idCard,StartDate) {
// 校验身份证号基本格式
if (!idCard || (idCard.length !== 15 && idCard.length !== 18)) {
throw new Error('身份证号格式不正确');
}
let birthDateStr;
// 处理15位身份证
if (idCard.length === 15) {
birthDateStr = '19' + idCard.substr(6, 6); // 15位身份证:6位出生年月(YYMMDD)
}
// 处理18位身份证
else {
birthDateStr = idCard.substr(6, 8); // 18位身份证:8位出生年月日(YYYYMMDD)
}
// 解析出生日期
const birthYear = parseInt(birthDateStr.substr(0, 4));
const birthMonth = parseInt(birthDateStr.substr(4, 2)) - 1; // 月份从0开始
const birthDay = parseInt(birthDateStr.substr(6, 2));
const birthDate = new Date(birthYear, birthMonth, birthDay);
//年龄的计算是要按照证件起期-出生日期来算年龄
// const currentDate = new Date();
const currentDate = new Date(StartDate);
// 计算年龄
let age = currentDate.getFullYear() - birthDate.getFullYear();
// 处理未到生日的情况
const currentMonth = currentDate.getMonth();
const currentDay = currentDate.getDate();
if (currentMonth < birthMonth ||
(currentMonth === birthMonth && currentDay < birthDay)) {
age--;
}
return age;
}
function saveApproveClick(){
// if(AgentDetailGrid.mulLineCount>2){
// if(i18nConfirm("机构存在客户经理多于2个,是否通过?", "LIS-00875")){
// document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?Operate=SAVEAPPROVE";
// document.all("Operate").value = "SAVEAPPROVE";
// submitForm(fm,"SAVEAPPROVE",true);
// }else{
// return false;
// }
// }else{
// document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?Operate=SAVEAPPROVE";
// document.all("Operate").value = "SAVEAPPROVE";
// submitForm(fm,"SAVEAPPROVE",true);
// }
// if (fm.deadInsuredAmntFlag.value != "1") {
// alert("请先点击未成年人累计身故保额查询!");
// return false;
// }
if (fm.InsuredAmntFlag.value != "1") {
alert("请先点击被保险人累计身故保额查询按钮!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql13");
tSQLInfo.addSubPara(tGrpPropNo);
var tArrCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArrCom != null && tArrCom != ""){
if(tArrCom[0][0] == 1){
if (fm.deadInsuredAmntFlag.value != "1") {
alert("请先点击未成年人累计身故保额查询!");
return false;
}
}
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("QueryESInfo");
tSQLInfo.addSubPara(tGrpPropNo);
var tResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tResult == null || tResult[0][0] !="1" )
{
alert("未上传投保影像件!");
// return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql167");
tSQLInfo.addSubPara(tGrpPropNo);
var tResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tResult != null)
{
alert("存在影像问题件未处理!");
return false;
}
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/SAVEAPPROVE?Operate=SAVEAPPROVE";
document.all("Operate").value = "SAVEAPPROVE";
submitForm(fm,"SAVEAPPROVE",true);
}
//险种查询
function queryRisk(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
if(tContPlanType == '00' || tContPlanType== '02' ){
if(tFlag=='4'){
if (/^8/.test(tGrpPropNo)) {
tSQLInfo.setSqlId("LCContSql206");
} else {
tSQLInfo.setSqlId("LCContSql227");
}
}else{
tSQLInfo.setSqlId("LCContSql206");
}
}
if(tContPlanType == '01'){
tSQLInfo.setSqlId("LCContSql207");
}
tSQLInfo.addSubPara(tGrpPropNo);
initRiskGrid();
turnPage7.queryModal(tSQLInfo.getString(), RiskGrid, 1, 1);
// if(RiskGrid.mulLineCount>=10){
// divQueryInfoPage.style.display = "";
// }else {
// divQueryInfoPage.style.display = "none";
// }
}
// function querySalesmanAndMediator(tMark) {
// if (tMark == "salesman") {
// if(fm2.SaleChnl.value == '07'){
// var strUrl = "LSQuotQuerySalesmanMain.jsp?QuotNo=" + tQuotNo+ "&AgentType=" + fm2.SaleChnl.value+"&AgentCom="+fm2.AgentCom.value +"&branchtype=perandgrp";
// window.open(strUrl, "业务员查询", 'height=600,width=600,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
// }else{
// var strUrl = "LSQuotQuerySalesmanMain.jsp?QuotNo=" + tQuotNo+ "&AgentType=" + fm2.SaleChnl.value+"&AgentCom="+fm2.AgentCom.value +"&branchtype=2";
// window.open(strUrl, "业务员查询", 'height=600,width=600,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
// }
//
// }
// if (tMark == "mediator") {
// var strUrl = "LSQuotQueryMediatorMain.jsp?QuotNo=" + tQuotNo + "&AgentType=" + fm2.SaleChnl.value;
// window.open(strUrl, "中介机构查询", 'height=600,width=600,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
// }
// }
//查询客户经理
function queryManager() {
var tBranchType="2";
if(fm.SaleChnl.value == '07'){
tBranchType="perandgrp";
}
//生成投保单增加业务员是否可为股东业务员校验
//询价申请佣金比例大于0时,在生成投保单环节不允许选择股东专员作为业务员
//判断询价申请佣金比例是否大于0
var tReplyCommRateFlag = "N";
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql210");
tSQLInfo.addSubPara(tGrpPropNo);
var tResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if(tResult != null && tResult != ""){
tReplyCommRateFlag = tResult[0][0];
}
var tManageCom = document.all("ManageCom").value;
var tSelNo = AgentDetailGrid.lastFocusRowNo;//行号从0开始
var strUrl = "LCGrpQueryManagerMain.jsp?SelNo="+tSelNo+"&ManageCom="+tManageCom+ "&AgentType=" + fm.SaleChnl.value+"&BranchType="+tBranchType+"&IsHealthy="+fm.SaleDepart.value +"&tPolicyAppDate="+ fm.PolicyAppDate.value +"&ReplyCommRateFlag="+tReplyCommRateFlag;
window.open(strUrl,"客户经理查询","height=600,width=900,left=0,top=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0");
}
//查询归属地客户经理
// function queryMComManager() {
// var tSelNo = BusinessAreaGrid.lastFocusRowNo;//行号从0开始
// var tManageCom = BusinessAreaGrid.getRowColData(tSelNo,1);
// var strUrl = "LCGrpQueryMComManagerMain.jsp?SelNo="+tSelNo+"&ManageCom="+tManageCom;
// window.open(strUrl,"归属地客户经理查询",'height=600,width=900,left=0,top=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
// }
//查询中介机构
function queryAgentCom() {
var tSaleChnl=document.all("SaleChnl").value;
var tSelNo = AgentComGrid.lastFocusRowNo;//行号从0开始
var tManageCom = document.all("ManageCom").value;
var strUrl = "LCGrpQueryAgentComMain.jsp?SelNo="+tSelNo+"&SaleChnl="+tSaleChnl+"&Flag=0&BranchType=2&ManageCom="+tManageCom;
window.open(strUrl,"中介机构查询",'height=600,width=900,left=0,top=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
//查询网点
function queryAgentCode() {
var tSaleDepart="";
// var tChnlType="";
var tSaleChnl="";
var tSelNo = AgentComGrid.lastFocusRowNo;//行号从0开始
var tManageCom = "";
var strUrl = "LCGrpQueryAgentComMain.jsp?SelNo="+tSelNo+"&ManageCom="+tManageCom+"&SaleDepart="+tSaleDepart+"&SaleChnl="+tSaleChnl+"&Flag=1";
window.open(strUrl,"网点查询",'height=600,width=900,left=0,top=0,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
}
//查询中介代理人
function querySalerInfo(){
var tSelNo = AgentComGrid.lastFocusRowNo;//行号从0开始
var tAgentCom = AgentComGrid.getRowColData(tSelNo,1);
var strUrl = "LCGrpQuerySalerMain.jsp?SelNo="+tSelNo+"&AgentCom="+tAgentCom;
window.open(strUrl,"中介代理人查询",'height=600,width=900,left=0,top=0,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
}
function caldateYear(tdate, tyear) {
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_claim");
tSQLInfo.setResourceName("g_claim.LLClaimCommonQuerySql");
tSQLInfo.setSqlId("LLClaimCommonQuerySql72");
tSQLInfo.addSubPara(tdate);
tSQLInfo.addSubPara(tyear);
return easyExecSql(tSQLInfo.getString());
}
//查询代理人信息
// function querySaler(){
// var salManageCom = document.all("ManageCom").value;
// var tAreaRow = BusinessAreaGrid.mulLineCount;
// for(var i=0;i SysDate && diffDays1 > 30){
alert("生效日期大于当前时间30天");
}
if(SysDate > ValDate && diffDays2-1 > 30){
alert("生效日期小于当前时间30天");
}
}
if (document.all("TotalAssets").value != null && document.all("TotalAssets").value !="") {
if (!validateTwoDecimal(document.all("TotalAssets").value)) {
alert("资产总额应保留两位小数");
return false;
}
}
if (document.all("IncomeAmnt").value != null && document.all("IncomeAmnt").value !="") {
if (!validateTwoDecimal(document.all("IncomeAmnt").value)) {
alert("营业收入应保留两位小数");
return false;
}
}
// if (!validatePhoneNumber(document.all("Phone1").value)) {
// alert("单位联系电话不是电话或手机号格式");
// return false;
// }
if (fm.Phone1.value.length>13){
alert("单位联系电话不能超过13位")
return false;
}
if (document.all("TaxPhone").value != null && document.all("TaxPhone").value !="") {
if (!validatePhoneNumber(document.all("TaxPhone").value)) {
alert("电话不是电话或手机号格式");
return false;
}
}
if (fm.IDType.value == '0') {
if (!validateCertificateDateByidCard(fm.IDNo.value, fm.IDStartDate.value, fm.IDEndDate.value)) {
const birthDate = getBirthdayFromIdCard(fm.IDNo.value);
//年龄的计算是要按照证件起期-出生日期来算年龄
// const today = new Date();
const today = new Date(fm.IDStartDate.value);
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
// if (age < 16) {
// alert("经办人年龄范围为0到15周岁,止期年-起期年=5")
// return false;
// }
// if (16 <= age && age <= 25) {
// alert("经办人年龄范围为16到25周岁,止期年-起期年=10")
// return false;
// }
// if (26 <= age && age <= 45) {
// alert("经办人年龄范围为26到45周岁,止期年-起期年=20")
// return false;
// }
}
}
if (fm.CorIDType.value == '0') {
if (!validateCertificateDateByidCard(fm.CorID.value, fm.CorIDStartDate.value, fm.CorIDExpiryDate.value)) {
const birthDate = getBirthdayFromIdCard(fm.CorID.value);
//年龄的计算是要按照证件起期-出生日期来算年龄
// const today = new Date();
const today = new Date(fm.CorIDStartDate.value);
let age = today.getFullYear() - birthDate.getFullYear() ;
const monthDiff = today.getMonth() - birthDate.getMonth();
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
// if (age < 16) {
// alert("法人/负责人年龄范围为0到15周岁,止期年-起期年=5")
// return false;
// }
// if (16 <= age && age <= 25) {
// alert("法人/负责人年龄范围为16到25周岁,止期年-起期年=10")
// return false;
// }
// if (26 <= age && age <= 45) {
// alert("法人/负责人年龄范围为26到45周岁,止期年-起期年=20")
// return false;
// }
}
}
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql27");
// tSQLInfo.addSubPara(tGrpPropNo);
// tSQLInfo.addSubPara(document.all("PayintvType").value);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// if (tPropEntry!=null && tPropEntry[0][0]=="1") {
// i18nAlert("保单下的产品不支持该缴费方式,请重新选择。", "LIS-01991");
// document.all("PayintvType").focus();
// return false;
// }
// if(document.all("PayintvType").value!="0"){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql28");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// if (tPropEntry!=null && tPropEntry[0][0]=="1") {
// i18nAlert("保单开通定期结算,只能选择趸缴。", "LIS-01992");
// document.all("PayintvType").focus();
// return false;
// }
// }
return true;
}
/**
*被保人清单查询
*/
function goToInsuredList(){
window.open("./LCPropEntrytoAddMain.jsp?GrpPropNo="+tGrpPropNo+"&Flag=01","被保人清单核对",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
* 共保设置
*/
function showCoinsurance() {
//共保标识为 否 时,不可维护共保信息
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql23");
// tSQLInfo.addSubPara(tGrpPropNo);
//
// var tCoinArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tCoinArr==null || tCoinArr[0][0]=="" || tCoinArr[0][0]=="0") {
// i18nAlert("[是否共保]为\"否\",不可进行共保设置,请先进行保存!", "LIS-01993");
// return false;
// }
//未操作保存进行共保数据转表不可进行查询
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql213");
tSQLInfo.addSubPara(tGrpPropNo);
var tCoinArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tCoinArr==null || tCoinArr[0][0]=="" ) {
alert("未进行保存操作不可进行共保查询!");
return false;
}
var tQueryFlag = "0";
if(tFlag==null || tFlag==""){
tQueryFlag = "1";
}
window.open("./LCCoinsuranceMain.jsp?GrpContNo="+ tGrpPropNo +"&QueryFlag="+ tQueryFlag+"&Flag="+tFlag+"&QuotNo="+tQuotNo,"共保查询",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
// function checkPayType(){
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCBalanceOnSql");
// tSQLInfo.setModule("grp_nb");
// tSQLInfo.setSqlId("LCBalanceOnSql2");
// tSQLInfo.addSubPara(tGrpPropNo);
// tSQLInfo.addSubPara(tGrpPropNo);
// var tRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// var payType = document.all("PayType").value;
// if (tRes==null) {
// i18nAlert("查询保单类型错误!", "LIS-01535");
// return false;
// } else {
// var policyFlag = tRes[0][0];
// if("S"!=policyFlag && payType == "09"){
// i18nAlert("弹性福利计划保单,付款方式不能选择【个人代扣】!", "LIS-01994");
// return false;
// }
// }
// return true;
// }
// function getPolicyFlag(){
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCBalanceOnSql");
// tSQLInfo.setModule("grp_nb");
// tSQLInfo.setSqlId("LCBalanceOnSql2");
// tSQLInfo.addSubPara(tGrpPropNo);
// tSQLInfo.addSubPara(tGrpPropNo);
// var tRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if (tRes==null) {
// i18nAlert("查询保单类型错误!", "LIS-01535");
// return false;
// } else {
// document.all("PolicyFlagName").value=tRes[0][1];
// }
// return true;
// }
/**
*中介机构调整
**/
function changeAgentType(){
initAgentComGrid();
}
function clearAddress(){
if(""==document.all("ProvinceName").value){
document.all("ProvinceCode").value="";
document.all("CityCode").value="";
document.all("CountyCode").value="";
}
if(""==document.all("CityName").value){
document.all("CityCode").value="";
document.all("CountyCode").value="";
}
if(""==document.all("CountyName").value){
document.all("CountyCode").value="";
}
return true;
}
//关联划分
// function showRelaInfo(){
// document.all("spanRelaPay").innerHTML = showRelaDiv();
// }
//展示关联
// function showRelaDiv() {
//
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql29");
// tSQLInfo.addSubPara("relabuss");
//
// var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
//
// var CheckCode;//因子编码
// var CheckName;//因子名称
// var CheckDesc;//名称展示
// var tInnerHTML0 = " | 合规关联 |
";
// var tInnerHTML1 = "";
//
// for (var i=0; i";
// }
// tInnerHTML1 += "| "+ CheckDesc +" | ";
// if((i+1)%3==0){
// tInnerHTML1 += "";
// }
// }
// var remarks = "";
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql30");
// tSQLInfo.addSubPara("Para13");
// tSQLInfo.addSubPara(tGrpPropNo);
// tSQLInfo.addSubPara("NB");
//
// var tArrArg = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if(tArrArg!=null && tArrArg[0][0]!=null){
// remarks = tArrArg[0][0];
// }
// tInnerHTML1 += "
";
// tInnerHTML0 = tInnerHTML0+tInnerHTML1;
//
// return tInnerHTML0;
// }
///展示值
// function setRelaFlag(obj){
// if(obj.checked==true){
// obj.value="1";
// }else {
// obj.value="0";
// }
// }
/**
*投保方案查询
**/
function showPlanQuery(){
window.open("./LCContPlanQueryMain.jsp?ContPlanType="+tContPlanType+"&GrpPropNo="+tGrpContNo+"&PolicyNo="+tGrpPropNo ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
*未成年人查询查询
**/
function showChildQuery(){
fm.deadInsuredAmntFlag.value = "1"
window.open("./LCContPolChildAmntMain.jsp?ContPlanType="+tContPlanType+"&GrpPropNo="+tGrpPropNo+"&PolicyNo="+tGrpPropNo+"&ManageCom="+tManageCom+"&Flag="+tFlag ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
*
**/
function showAbnormalInfo(){
window.open("./LCContAbnormalInfoMain.jsp?ContPlanType="+tContPlanType+"&GrpPropNo="+tGrpPropNo+"&PolicyNo="+tGrpPropNo ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
*
**/
function showInsuredQuery(){
fm.InsuredAmntFlag.value = "1"
window.open("./LCContPolInsuredAmntMain.jsp?ContPlanType="+tContPlanType+"&GrpPropNo="+tGrpPropNo+"&PolicyNo="+tGrpPropNo ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function showInsuredGrpNameQuery(){
window.open("./LCGrpNameAncientlyClaimMain.jsp?GrpName=" + document.all("GrpName").value ,"方案查询",'height='+screen.availHeight+',width='+screen.availWidth+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
/**
* 理赔责任控制
*/
function claimDutyControl(){
var strUrl="../g_claim/LLCLaimControlMain.jsp?BussType=NB&Flag=1&BussNo="+ document.all("GrpPropNo").value;
window.open(strUrl,"理赔责任控制",'width=1600,height=620,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
//普通团单新增校验
function CheckPTOtherInput(){
if(document.all("InstScateGory").value=="3"){
i18nAlert("请核实机构是否符合免尽职调查机构!", "LIS-01995");
}
if(document.all("InstScateGory").value=="1"&&(document.all("ControlTaxrStype").value==""||document.all("ControlTaxrStype").value==null)){
i18nAlert("机构类别为消极非金融机构时,控制人税收居民类型不能为空!", "LIS-01607");
return false;
}
if(document.all("ControlTaxrStype").value=="2"||document.all("ControlTaxrStype").value=="3"){
var Sql43 = wrapSql("g_app.LCContSql","LCContSql43",[tGrpPropNo],"grp_common");
var result43 = easyExecSql(Sql43);
var Sql44 = wrapSql("g_app.LCContSql","LCContSql44",[tGrpPropNo],"grp_common");
var result44 = easyExecSql(Sql44);
if(result43==null||result44==null){
i18nAlert("控制人税收居民类型选择2或3时,需录入控制人详细信息和机构详细信息!", "LIS-01609");
return false;
}
}
if(document.all("TaxrStatus").value=="2"||document.all("TaxrStatus").value=="3"){
var Sql44 = wrapSql("g_app.LCContSql","LCContSql44",[tGrpPropNo],"grp_common");
var result44 = easyExecSql(Sql44);
if(result44==null){
i18nAlert("当机构税收居民身份选择2或3时,需录入机构详细信息!", "LIS-01996");
return false;
}
}
return true;
}
//初始化机构税收,控制人税收居民类型
// function showTaxrButton(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setResourceName("g_app.LCContSql");
// tSQLInfo.setModule("grp_common");
// tSQLInfo.setSqlId("LCContSql40");
// tSQLInfo.addSubPara(tGrpPropNo);
// var tTarx = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
// if(tTarx!=null){
// document.all("TarxButton").style.display="";
// }
// tSQLInfo2 = new SqlClass();
// tSQLInfo2.setResourceName("g_app.LCContSql");
// tSQLInfo2.setModule("grp_common");
// tSQLInfo2.setSqlId("LCContSql42");
// tSQLInfo2.addSubPara(tGrpPropNo);
// var tCoPerTarx = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
// if(tCoPerTarx!=null){
// document.all("ContTarxButton").style.display="";
// }
// // var strSQL ="select otherno from LCCTaxrInformation where otherno = '"+tGrpPropNo+"' and persontype='0'";
// // var arrResult=easyExecSql(strSQL);
// var mySql = new SqlClass2();
// mySql.api(true);
// mySql.module("grp_nb");
// mySql.resourceName("others.Grp_Nb");//指定使用的interface文件名
// mySql.sqlId("LCGrpContPolInput1");//指定使用的Sql的id
// mySql.put("tGrpPropNo",tGrpPropNo);// 指定传入的参数
// var arrResult=easyExecSql(mySql.string());
// if(arrResult != null) {
// document.all("TarxPepButton").style.display="";
// }
// }
//投保方案选择
function ChooseInsurePlan(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("checkGrpBlackSql");
tSQLInfo.addSubPara(tGrpPropNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry!=null && tPropEntry[0][0]=="1") {
window.open("./AntiMoneyLauICustInfoMain.jsp?OtherNo="+tGrpPropNo+"&rGrpContNo="+tGrpPropNo+"&standflag=1&GrpName1="+fm.GrpName.value+"&AuditFlag=null","反洗钱客户身份识别信息录入",'height=400,width=1000,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
return ;
}
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql63");
tSQLInfo2.addSubPara(tGrpPropNo);
var tarrResult = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
if(tarrResult !=null){
alert("请删除全部被保险人后进行方案选择。")
return false;
}
//导入修改投保客户信息保存必点校验
//导入投保信息投保单位客户号为000000,进行保存操作后更新为共享服务返回客户号
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_common");
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setSqlId("LCContSql230");
tSQLInfo.addSubPara(tGrpContNo);
var tSaveBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tSaveBtnFlag !=null){
alert("存在导入投保单位信息未保存,请点击保存按钮!");
return false;
}
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql49");
tSQLInfo2.addSubPara(tGrpPropNo);
var tarr = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
if(tarr!=null){
var strUrl ="./LCProposalSelectPlanMain.jsp?GrpPropNo="+ tGrpPropNo+"&ContPlanType="+tContPlanType+"&QuotNo="+tQuotNo+"&QuotType="+tQuotType
+"&MissionID="+fm.MissionID.value+"&ActivityID="+fm.ActivityID.value+"&SubMissionID="+fm.SubMissionID.value+"&Flag=0&BussType=G_NB&SubType=21001,21002,21003,21004,21005,21006,21007,21008,21009";
window.open(strUrl,'LCProposalSelectPlanMain.jsp','width='+screen.availWidth+',height='+screen.availHeight+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}else{
alert("请先保存投保信息,再进行投保方案选择");
return false;
}
}
function InsureListProtect(){
//导入修改投保客户信息保存必点校验
//导入投保信息投保单位客户号为000000,进行保存操作后更新为共享服务返回客户号
tSQLInfo = new SqlClass();
tSQLInfo.setModule("grp_common");
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setSqlId("LCContSql230");
tSQLInfo.addSubPara(tGrpContNo);
var tSaveBtnFlag = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tSaveBtnFlag !=null){
alert("存在导入投保单位信息未保存,请点击保存按钮!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("checkGrpBlackSql");
tSQLInfo.addSubPara(tGrpPropNo);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry!=null && tPropEntry[0][0]=="1") {
window.open("./AntiMoneyLauICustInfoMain.jsp?OtherNo="+tGrpPropNo+"&rGrpContNo="+tGrpPropNo+"&standflag=1&GrpName1="+fm.GrpName.value+"&AuditFlag=null","反洗钱客户身份识别信息录入",'height=400,width=1000,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
return ;
}
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql48");
tSQLInfo2.addSubPara(tGrpPropNo);
var tArr = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
if(tArr!=null){
var strUrl ="./LCInsuredInfoMain.jsp?GrpPropNo="+ tGrpPropNo+"&ContPlanType="+tContPlanType+"&QuotNo="+tQuotNo+"&ManageCom="+fm.ManageCom.value+"&QuotType="+tQuotType
+"&MissionID="+fm.MissionID.value+"&ActivityID="+fm.ActivityID.value+"&SubMissionID="+fm.SubMissionID.value+"&Flag=0&BussType=G_NB&SubType=21001,21002,21003,21004,21005,21006,21007,21008,21009";
window.open(strUrl,'LCInsuredInfoMain.jsp','width='+screen.availWidth+',height='+screen.availHeight+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}else{
alert("请先选择投保方案,再进行人员清单维护");
return false;
}
}
/**
* 关联方模糊认定结果
*/
var relationbtn= 0 ;
function relationresult() {
relationbtn+=1;
var numFlag = 0;
var GrpName = fm.all("GrpName").value;
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql50");
tSQLInfo2.addSubPara(GrpName);
var tArr = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
if(tArr!=null) {
alert("客户名称和关联方库匹配一致");
fm.all("Relateflag").value = '1';
fm.all("RelateflagName").value = '是';
numFlag += 1;
return ;
}
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql51");
var arr2 = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
if(arr2!=null){
for(var i=0;i= 16 && age <= 25) {
return yearDiff === 10;
} else if (age >= 26 && age <= 45) {
return yearDiff === 20;
} else {
return false; // 年龄不在校验范围内
}
}
/**
* 退回至生成投保单
*/
function goToContInput(){
var backReason= prompt("请输入退回原因");
if (backReason != null && backReason != ""){
document.all("BackReason").value=backReason;
}
mOperate = "GoToContInput";
fm.Operate.value= "GoToContInput";
fm.action = "../API/grp_nb/g_app/LCGrpUWSave/UPDATE";
// submitForm();
ajaxSubmit2(document.getElementById("fm"));
}
/**
* 核保处理
*/
function goToGErr(){
var tGrpPropNo = tQualityGrpcontNo;
window.open("./LCQualityUWGErrMain.jsp?GrpPropNo="+tGrpPropNo,"核保处理",'width=1600,height=620,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function showQuotInfo() {
tSQLInfo2 = new SqlClass();
tSQLInfo2.setResourceName("g_app.LCContSql");
tSQLInfo2.setModule("grp_common");
tSQLInfo2.setSqlId("LCContSql208");
if(tFlag=='4'){
tSQLInfo2.addSubPara(tGrpContNo);
}else{
tSQLInfo2.addSubPara(tGrpPropNo);
}
var arrResult = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
var prtno = arrResult[0][0];
if(tFlag=='4'){
var tSrc = "../g_quot/LSQuotQueryInput.jsp?ShowFlag=Edor&PrtNo=" + tGrpContNo;
}else if (tFlag=='6'){
var tSrc = "../g_quot/LSQuotQueryInput.jsp?ShowFlag=Edor&PrtNo=" + tGrpPropNo + "&QuotNo=" + prtno + "&Flag=" + tFlag;
} else{
var tSrc = "../g_quot/LSQuotQueryInput.jsp?ShowFlag=Edor&PrtNo=" + tGrpPropNo;
}
window.open(tSrc, "询价查询", 'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}