You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4635 lines
162 KiB
4635 lines
162 KiB
/***************************************************************
|
|
* <p>ProName:LCContPolInput.js</p>
|
|
* <p>Title:新单录入</p>
|
|
* <p>Description:新单录入</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : 蔡云聪
|
|
* @version : 8.0
|
|
* @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("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;
|
|
}
|
|
}
|
|
}
|
|
|
|
//人名清单确认是否点击校验
|
|
//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 checkTotalAssets(input){
|
|
if (!validateTwoDecimal(input)) {
|
|
alert("资产总额只能保存两位小数");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function QueryContInfo(){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql202");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry==null) {
|
|
|
|
}else{
|
|
document.getElementById("SumPrem").value = tPropEntry[0][0];
|
|
document.getElementById("FirstPayDate").value = tPropEntry[0][1];
|
|
document.getElementById("PolicyMaturityDate").value = tPropEntry[0][2];
|
|
document.getElementById("TerminationDate").value = tPropEntry[0][3];
|
|
document.getElementById("TerminationReason").value = tPropEntry[0][4];
|
|
document.getElementById("PolTypeFlag").value = tPropEntry[0][5];
|
|
document.getElementById("PolTypeFlagName").value = tPropEntry[0][6];
|
|
document.getElementById("GetPolDate").value = tPropEntry[0][7];
|
|
document.getElementById("CValiDate").value = tPropEntry[0][8];
|
|
document.getElementById("CustomGetPolDate").value = tPropEntry[0][9];
|
|
}
|
|
}
|
|
function queryUWInfo(){
|
|
initUWGrid();
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql203");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
turnPage6.queryModal(tSQLInfo.getString(), UWGrid, 1, 1);
|
|
|
|
}
|
|
/**
|
|
* 影像扫描件查询
|
|
*/
|
|
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");
|
|
tSQLInfo.setSqlId("LCContSql221");
|
|
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 = "否";
|
|
}
|
|
|
|
document.all("NTBBSumPrems").value=tPropEntry[0][59];
|
|
|
|
//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);
|
|
queryContPeoples();
|
|
queryRisk();
|
|
|
|
}
|
|
|
|
}
|
|
function queryContPeoples(){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContPeoplesSql");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry==null) {
|
|
return false;
|
|
} else {
|
|
|
|
document.all("SumInsuPeoples").value = tPropEntry[0][0];
|
|
document.all("MainInsuPeoples").value = tPropEntry[0][1];
|
|
document.all("RelaInsuPeoples").value = tPropEntry[0][2];
|
|
}
|
|
|
|
//契约人数展示
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContTBPeoplesSql");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var tTBPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tTBPropEntry==null) {
|
|
return false;
|
|
} else {
|
|
|
|
document.all("TBMainInsuPeoples").value = tTBPropEntry[0][0];
|
|
document.all("TBRelaInsuPeoples").value = tTBPropEntry[0][1];
|
|
document.all("TBSumInsuPeoples").value = tTBPropEntry[0][2];
|
|
}
|
|
}
|
|
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 PreparCustomerNo='';
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql201");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry!=null) {
|
|
PreparCustomerNo=tPropEntry[0][0];
|
|
}
|
|
var strUrl ="./LCPreparCustomerMain.jsp?PreparCustomer="+ fm.PreparCustomer.value+"&PreparCustomerNo="+PreparCustomerNo+"&Flag=3";
|
|
|
|
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 insuredAccountInfo(){
|
|
window.open("./LCContAccountInfoMain.jsp?GrpPropNo="+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 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];
|
|
|
|
// 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");
|
|
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("PreparCustomer").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("AppntNo").value=tPropEntry[0][61];
|
|
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;
|
|
// }
|
|
DivNewGrpSpec.style.display='';
|
|
document.all("NewGrpSpec").value=document.all("GrpSpec").value;
|
|
|
|
}
|
|
|
|
/**
|
|
* 修改特别约定
|
|
*/
|
|
function upGrpSpecSubmit(){
|
|
|
|
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?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;
|
|
}
|
|
|
|
//校验客户经理信息
|
|
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; i<tCount;i++){
|
|
|
|
if(AgentDetailGrid.getRowColData(i,1)==null||AgentDetailGrid.getRowColData(i,1)==''){
|
|
i18nAlert("请输入客户经理!", "LIS-01672");
|
|
return false;
|
|
}
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContSql");
|
|
// tSQLInfo.setModule("grp_common");
|
|
// tSQLInfo.setSqlId("LCContSql25");
|
|
// tSQLInfo.addSubPara(AgentDetailGrid.getRowColData(i,1));
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// var tAgentState = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
//
|
|
// if (tAgentState==null || tAgentState[0][0]!="1") {
|
|
// if(tBFFlag=="1"){
|
|
// i18nAlert("承保地客户经理【{0}】资格证不存在或者不在有效期!", "LIS-01673", AgentDetailGrid.getRowColData(i,2));
|
|
// return false;
|
|
// }else {
|
|
// if(!i18nConfirm("承保地客户经理【{0}】资格证不存在或者不在有效期!是否继续?", "LIS-00872", AgentDetailGrid.getRowColData(i,2))){
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
if(AgentDetailGrid.getRowColData(i,4)==null||AgentDetailGrid.getRowColData(i,4)==''){
|
|
i18nAlert("请输入客户经理分佣比例!", "LIS-99999");
|
|
return false;
|
|
}
|
|
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;j<tCount;j++){
|
|
if(AgentDetailGrid.getRowColData(i,1)==AgentDetailGrid.getRowColData(j,1)){
|
|
i18nAlert("请勿录入重复的客户经理!", "LIS-01677");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if(AgentDetailGrid.getRowColData(i,5)=="1" ){
|
|
if(mainAgentFlag ) {
|
|
alert("只能选择一个主业务员");
|
|
return false;
|
|
}else{
|
|
mainAgentFlag = true;
|
|
}
|
|
}
|
|
tMoney+=Number(AgentDetailGrid.getRowColData(i,4));
|
|
}
|
|
if(!mainAgentFlag ) {
|
|
alert("必须选择一个主业务员");
|
|
return false;
|
|
}
|
|
|
|
if(tMoney !=1){
|
|
i18nAlert("客户经理分佣比例之和应该等于1", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
// 校验增加业绩归属信息
|
|
// BusinessAreaGrid.delBlankLine();
|
|
// var tAreaRow = BusinessAreaGrid.mulLineCount;
|
|
// if(document.all("BusinessArea").checked&&tAreaRow==0){
|
|
// i18nAlert("请录入业绩归属地信息!", "LIS-01679");
|
|
// return false;
|
|
// }
|
|
/**
|
|
if(document.all("BusinessArea").checked==true){
|
|
if(document.all("SalerInfo").checked==false){
|
|
i18nAlert("如果勾选录入【业绩归属地信息】必须勾选【代理人信息】!", "LIS-01680");
|
|
return false;
|
|
}
|
|
}
|
|
**/
|
|
// var tAreaRate = 0;
|
|
// if(document.all("BusinessArea").checked&&tAreaRow>0){
|
|
// 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("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").value<ttCurrentDate){
|
|
alert("单位证件有效止期需晚于当前日期");
|
|
return false;
|
|
}
|
|
}
|
|
if(document.all("CorIDStartDate").value !=''){
|
|
if(document.all("CorIDStartDate").value>ttCurrentDate){
|
|
alert("法人/负责人证件有效起期不能晚于当前日期");
|
|
return false;
|
|
}
|
|
}
|
|
if(document.all("CorIDExpiryDate").value !=''){
|
|
if(document.all("CorIDExpiryDate").value<ttCurrentDate){
|
|
alert("法人/负责人证件有效止期需晚于当前日期");
|
|
return false;
|
|
}
|
|
}
|
|
if(document.all("IDStartDate").value !=''){
|
|
if(document.all("IDStartDate").value>ttCurrentDate){
|
|
alert("经办人证件有效止期不能晚于当前日期");
|
|
return false;
|
|
}
|
|
}
|
|
if(document.all("IDEndDate").value !=''){
|
|
if(document.all("IDEndDate").value<ttCurrentDate){
|
|
alert("经办人证件有效止期需晚于当前日期");
|
|
return false;
|
|
}
|
|
}
|
|
if(document.all("CorIDType").value=='0'){
|
|
if(!checkIdCard(document.all("CorID").value)){
|
|
document.all("CorID").focus();
|
|
return false;
|
|
}
|
|
}
|
|
//经办人身份证查询
|
|
if(document.all("IDType").value=='0'){
|
|
if(!checkIdCard(document.all("IDNo").value)){
|
|
document.all("IDNo").focus();
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 增加北京健康险投保人必须录入联系地址
|
|
// if(!checkCity()){
|
|
// return false;
|
|
// }
|
|
// if(document.all("DetailAddress").value==""){
|
|
// i18nAlert("请录入地址信息!", "LIS-01685");
|
|
// document.all("DetailAddress").focus();
|
|
// return false;
|
|
// }
|
|
|
|
|
|
|
|
|
|
//校验单位证件信息
|
|
// IDInfoGrid.delBlankLine();
|
|
// var tIDInfoRow = IDInfoGrid.mulLineCount;
|
|
// if(document.all("IDInfo").checked && tIDInfoRow==0){
|
|
// i18nAlert("请录入单位证件信息!", "LIS-01686");
|
|
// return false;
|
|
// }
|
|
// if(document.all("IDInfo").checked && tIDInfoRow>0){
|
|
// 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/UPDATE?Operate=INSERT";
|
|
submitForm(fm,"INSERT",true);
|
|
|
|
}
|
|
//校验中介机构是否和销售部门销售类型销售渠道相符
|
|
// function checkSale(){
|
|
//
|
|
// var tAgentComRow = AgentComGrid.mulLineCount;
|
|
// for(var i=0;i<tAgentComRow;i++){
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCGrpQueryManagerSql");
|
|
// tSQLInfo.setModule("grp_nb");
|
|
// tSQLInfo.setSqlId("LCGrpQueryManagerSql7");
|
|
// tSQLInfo.addSubPara(AgentComGrid.getRowColData(i,1));
|
|
// tSQLInfo.addSubPara(document.all("SaleChnl").value);
|
|
// tSQLInfo.addSubPara(document.all("ManageCom").value);
|
|
// var tAgentCom = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
//
|
|
// if (!tAgentCom=='1') {
|
|
// i18nAlert("中介机构和销售渠道信息不符!", "LIS-01691");
|
|
// return false;
|
|
// }
|
|
// }
|
|
// return true;
|
|
// }
|
|
|
|
function LcgrpcontPolCheck(){
|
|
if (fm.CorIDType.value == 'I' && fm.CorID.value.length != 15) {
|
|
alert("法定/负责人代表人证件类型为外国人永久居留身份证,证件号码必须为15位!");
|
|
return false;
|
|
}
|
|
if (fm.IDType.value == 'I' && fm.IDNo.value.length != 15) {
|
|
alert("经办人一证件类型为外国人永久居留身份证,证件号码必须为15位!");
|
|
return false;
|
|
}
|
|
//校验经办人姓名
|
|
if(!fm.LinkMan.value ==""){
|
|
if(!isNaN(parseInt(fm.LinkMan.value,10))){
|
|
alert("经办人姓名不能为空或者不能为纯数字组合");
|
|
return false;
|
|
}
|
|
}
|
|
if (fm.PayType.value == "7" || fm.PayType.value == "E") {
|
|
alert("付款方式不能选择此方式,请选择其他方式!");
|
|
return false;
|
|
}
|
|
// 关于股东暂时没有校验,后续增加股东则需要校验
|
|
// if (fm.PartnerName1.value == null || fm.PartnerName1.value == "") {
|
|
// alert("投保人为团体,主要控股股东1名称不能为空!");
|
|
// return false;
|
|
// }
|
|
// if (fm.GrpNature1.value == null || fm.GrpNature1.value == "") {
|
|
// alert("投保人为团体,主要控股股东1单位性质不能为空!");
|
|
// return false;
|
|
// }
|
|
|
|
if (fm.TaxFlag.value == "1") { //专用发票
|
|
if (fm.TaxName.value == "" || fm.TaxName.value == null) {
|
|
alert("纳税人单位名称不能为空!");
|
|
return false;
|
|
}
|
|
if (fm.TaxNo.value == "" || fm.TaxNo.value == null) {
|
|
alert("纳税人识别号不能为空!");
|
|
return false;
|
|
}
|
|
if (fm.TaxAddress.value == "" || fm.TaxAddress.value == null) {
|
|
alert("地址不能为空!");
|
|
return false;
|
|
}
|
|
// if (fm.TaxPhone.value == "" || fm.TaxPhone.value == null) {
|
|
// alert("电话不能为空!");
|
|
// return false;
|
|
// }
|
|
if (fm.TaxBankName.value == "" || fm.TaxBankName.value == null) {
|
|
alert("开户行不能为空!");
|
|
return false;
|
|
}
|
|
if (fm.TaxBankAccNo.value == "" || fm.TaxBankAccNo.value == null) {
|
|
alert("账户不能为空!");
|
|
return false;
|
|
}
|
|
// if (IDInfoGrid.mulLineCount <= 0) {
|
|
// alert("请填写税务登记证!");
|
|
// return false;
|
|
// }
|
|
// var isbolean = true;
|
|
// for (var i = 0; i < IDInfoGrid.mulLineCount; i++) {
|
|
// if (IDInfoGrid.getRowColData(i, 1) == '3'){
|
|
// isbolean = false;
|
|
// var idno=IDInfoGrid.getRowColData(i,3);
|
|
// // if (IDInfoGrid.getRowColData(i,3) == "" || IDInfoGrid.getRowColData(i,3) == null) {
|
|
// // alert("税务登记证证件号码不能为空!");
|
|
// // return false;
|
|
// // }
|
|
// // if (IDInfoGrid.getRowColData(i,4) == "" || IDInfoGrid.getRowColData(i,4) == null) {
|
|
// // alert("税务登记证证件有效起期不能为空!");
|
|
// // return false;
|
|
// // }
|
|
// // if (IDInfoGrid.getRowColData(i,5) == "" || IDInfoGrid.getRowColData(i,5) == null) {
|
|
// // alert("税务登记证证件有效止期不能为空!");
|
|
// // return false;
|
|
// // }
|
|
// //校验
|
|
// if (TaxNoCheck(idno) == false) {
|
|
// return false;
|
|
// }
|
|
// }
|
|
//
|
|
// }
|
|
// if(isbolean){
|
|
// alert("请填写税务登记证!");
|
|
// return false;
|
|
// }
|
|
|
|
//add by liuss 纳税人识别号需求,新增校验。在选择法人组织或非法人组织情况下校验
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
if (fm.TaxFlag.value == "2") {//增值税发票
|
|
if (fm.TaxName.value == "" || fm.TaxName.value == null) {
|
|
alert("纳税人单位名称不能为空!");
|
|
return false;
|
|
}
|
|
|
|
// if (IDInfoGrid.mulLineCount <= 0) {
|
|
// alert("请填写税务登记证!");
|
|
// return false;
|
|
// }
|
|
// var isbolean = true;
|
|
// for (var i = 0; i < IDInfoGrid.mulLineCount; i++) {
|
|
// if (IDInfoGrid.getRowColData(i, 1) == '3'){
|
|
// isbolean = false;
|
|
// var idno=IDInfoGrid.getRowColData(i,3);
|
|
// // if (IDInfoGrid.getRowColData(i,3) == "" || IDInfoGrid.getRowColData(i,3) == null) {
|
|
// // alert("税务登记证证件号码不能为空!");
|
|
// // return false;
|
|
// // }
|
|
// // if (IDInfoGrid.getRowColData(i,4) == "" || IDInfoGrid.getRowColData(i,4) == null) {
|
|
// // alert("税务登记证证件有效起期不能为空!");
|
|
// // return false;
|
|
// // }
|
|
// // if (IDInfoGrid.getRowColData(i,5) == "" || IDInfoGrid.getRowColData(i,5) == null) {
|
|
// // alert("税务登记证证件有效止期不能为空");
|
|
// // return false;
|
|
// // }
|
|
// //校验
|
|
// if (TaxNoCheck(idno) == false) {
|
|
// return false;
|
|
// }
|
|
// }
|
|
//
|
|
// }
|
|
// if(isbolean){
|
|
// alert("请填写税务登记证!");
|
|
// return false;
|
|
// }
|
|
|
|
}
|
|
//校验“合同争议处理方式”必录 等于1 仲裁委员会名称
|
|
if(fm.DisputedFlag.value == "1"){
|
|
if (fm.ArbitrationCom.value == "" || fm.ArbitrationCom.value == null) {
|
|
alert("仲裁委员会名称不能为空!");
|
|
return false;
|
|
}
|
|
}
|
|
// 电子商务需求校验
|
|
if (fm.PayType.value == "7" || fm.PayType.value == "4") {
|
|
if (fm.BankCode.value == "" || fm.BankCode.value == null) {
|
|
alert("付款方式为银行转账或者银行转账(非制返盘),请录入开户银行!");
|
|
return false;
|
|
|
|
}
|
|
if (fm.BankAccNo.value == "" || fm.BankAccNo.value == null) {
|
|
alert("付款方式为银行转账或者银行转账(非制返盘),请录入银行账号!");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//杂校验
|
|
if (fm.SumNumPeople.value != (fm.AllOnWorkPeoples.value * 1) + (fm.AllOffWorkPeoples.value * 1)) {
|
|
alert("【员工总数】应等于【在职人数】与【退休人数】之和!");
|
|
return false;
|
|
}
|
|
if (fm.SumInsuPeoples.value != (fm.RelaInsuPeoples.value * 1) + (fm.MainInsuPeoples.value * 1)) {
|
|
alert("【合计】应等于【主被保险人数】与【附属被保险人数】之和!");
|
|
return false;
|
|
}
|
|
|
|
|
|
if (fm.PayintvType.value != "0") {
|
|
alert("短险方案的缴费方式应为趸缴,请修改!");
|
|
return false;
|
|
}
|
|
|
|
//生成投保单环节,营业执照、投保单位名称是否一致友好提示校验
|
|
//营业执照相同,但是投保单位名称存在差异,给出非阻断提示。投保单位名称一致,营业执照不同,给出非阻断提示。
|
|
if(fm.GrpIDType.value == "6"){
|
|
//依据证件号码查询单位名称
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql184");
|
|
tSQLInfo.addSubPara(fm.GrpID.value);
|
|
tSQLInfo.addSubPara(fm.GrpName.value);
|
|
tSQLInfo.addSubPara(fm.GrpID.value);
|
|
tSQLInfo.addSubPara(fm.GrpName.value);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry !=null && tPropEntry != "" && tPropEntry[0][0] == "1") {
|
|
var tConfirm = confirm("投保单位名称已存在,但是录入的营业执照证件号码与已有信息不一致!");
|
|
if (!tConfirm){
|
|
return;
|
|
}
|
|
}
|
|
//依据单位名称查询证件号码
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql185");
|
|
tSQLInfo.addSubPara(fm.GrpID.value);
|
|
tSQLInfo.addSubPara(fm.GrpName.value);
|
|
tSQLInfo.addSubPara(fm.GrpID.value);
|
|
tSQLInfo.addSubPara(fm.GrpName.value);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry !=null && tPropEntry != "" && tPropEntry[0][0] == "1") {
|
|
var tConfirm = confirm("营业执照证件号码已存在,但是录入的投保单位名称与已有信息不一致!");
|
|
if (!tConfirm){
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
}
|
|
function compareTwoDate(date1, date2) {
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContSql");
|
|
// tSQLInfo.setModule("grp_common");
|
|
// tSQLInfo.setSqlId("LCContSql180");
|
|
// tSQLInfo.addSubPara(date1);
|
|
// tSQLInfo.addSubPara(date2);
|
|
// var result= easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
// return result[0][0];
|
|
const dateStr1 = new Date(date1);
|
|
const dateStr2 = new Date(date2);
|
|
return dateStr1 > 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.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.encoding="";
|
|
|
|
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;i<tTooContectRow;i++){
|
|
|
|
// if (TooContectGrid.getRowColData(i, 2) == null || TooContectGrid.getRowColData(i, 2) == '') {
|
|
// i18nAlert("联系人电话不能为空", "LIS-99999");
|
|
// return false;
|
|
// }
|
|
if (TooContectGrid.getRowColData(i, 4) == null || TooContectGrid.getRowColData(i, 4) == '') {
|
|
i18nAlert("联系人手机号不能为空", "LIS-99999");
|
|
return false;
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 6) == null || TooContectGrid.getRowColData(i, 6) == '') {
|
|
i18nAlert("联系人证件类型不能为空", "LIS-99999");
|
|
return false;
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 7) == null || TooContectGrid.getRowColData(i, 7) == '') {
|
|
i18nAlert("联系人证件号码不能为空", "LIS-99999");
|
|
return false;
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 8) == null || TooContectGrid.getRowColData(i, 8) == '') {
|
|
i18nAlert("联系人证件有效起期不能为空", "LIS-99999");
|
|
return false;
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 9) == null || TooContectGrid.getRowColData(i, 9) == '') {
|
|
i18nAlert("联系人证件有效止期不能为空", "LIS-99999");
|
|
return false;
|
|
}
|
|
if(TooContectGrid.getRowColData(i,7)!=null&&TooContectGrid.getRowColData(i,7)!=''){
|
|
|
|
if(TooContectGrid.getRowColData(i,6)==null||TooContectGrid.getRowColData(i,6)==''){
|
|
i18nAlert("请录入联系人证件类型!", "LIS-01692");
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,6)!=null&&TooContectGrid.getRowColData(i,6)!=''){
|
|
|
|
if(TooContectGrid.getRowColData(i,7)==null||TooContectGrid.getRowColData(i,7)==''){
|
|
i18nAlert("请录入联系人证件号码!", "LIS-01601");
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,6)=='0'){
|
|
if(!checkIdCard(TooContectGrid.getRowColData(i,7))){
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,8)!=null&&TooContectGrid.getRowColData(i,8)!=''){
|
|
if(TooContectGrid.getRowColData(i,8)>tCurrentDate){
|
|
alert("联系人证件有效起期不能大于当前日期!");
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,9)!=null&&TooContectGrid.getRowColData(i,9)!=''){
|
|
if(TooContectGrid.getRowColData(i,9)<tCurrentDate){
|
|
i18nAlert("联系人证件有效止期需大于当前日期!", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,2)!=null && TooContectGrid.getRowColData(i,2) != ""){
|
|
if (!validatePhoneNumber(TooContectGrid.getRowColData(i,2))) {
|
|
i18nAlert("联系人电话只能是电话或手机号格式", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
if(TooContectGrid.getRowColData(i,4)!=null && TooContectGrid.getRowColData(i,4) != ""){
|
|
if (!validatePhone(TooContectGrid.getRowColData(i,4))) {
|
|
i18nAlert("联系人手机号格式错误", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (TooContectGrid.getRowColData(i,6) == '0') {
|
|
var IDStartDate =TooContectGrid.getRowColData(i,8);
|
|
var IDExpDate=TooContectGrid.getRowColData(i,9);
|
|
var birthday=getBirthdayFromIdCard(TooContectGrid.getRowColData(i,7));
|
|
if (!validateCertificateDate(birthday, IDStartDate, IDExpDate)) {
|
|
const birthDate = new Date(birthday);
|
|
//年龄的计算是要按照证件起期-出生日期来算年龄
|
|
// const today = new Date();
|
|
const today = new Date(IDStartDate);
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
function checkIDInfo(){
|
|
|
|
if(!IDInfoGrid.checkValue("IDInfoGrid")){
|
|
return false;
|
|
}
|
|
|
|
var tIDInfoRow = IDInfoGrid.mulLineCount;
|
|
for(var i=0;i<tIDInfoRow;i++){
|
|
if(IDInfoGrid.getRowColData(i,1)==document.all("GrpIDType").value){
|
|
i18nAlert("单位多证件列表与录入的【单位证件类型】重复,请进行调整!", "LIS-01812");
|
|
return false;
|
|
}
|
|
for(var j=i+1;j<tIDInfoRow;j++){
|
|
if(IDInfoGrid.getRowColData(i,1)==IDInfoGrid.getRowColData(j,1)){
|
|
i18nAlert("请勿录入重复【证件类型编码】!", "LIS-03910");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
for (var i=0; i<tIDInfoRow;i++){
|
|
if (IDInfoGrid.getRowColData(i,3) == "" || IDInfoGrid.getRowColData(i,3) == null) {
|
|
alert(IDInfoGrid.getRowColData(i,2)+"证件号码不能为空!");
|
|
return false;
|
|
}
|
|
if (IDInfoGrid.getRowColData(i,4) == "" || IDInfoGrid.getRowColData(i,4) == null) {
|
|
alert(IDInfoGrid.getRowColData(i,2)+"证件有效起期不能为空!");
|
|
return false;
|
|
}
|
|
if (IDInfoGrid.getRowColData(i,5) == "" || IDInfoGrid.getRowColData(i,5) == null) {
|
|
alert(IDInfoGrid.getRowColData(i,2)+"证件有效止期不能为空!");
|
|
return false;
|
|
}
|
|
var ttCurrentDate = document.all("tCurrentDate").value;
|
|
if(IDInfoGrid.getRowColData(i,4) !=null && IDInfoGrid.getRowColData(i,4) !=''){
|
|
if(IDInfoGrid.getRowColData(i,4)>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)<tCurrentDate){
|
|
i18nAlert(IDInfoGrid.getRowColData(i,2)+"证件有效止期需大于当前日期!", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
if((IDInfoGrid.getRowColData(i,5)!=null&&IDInfoGrid.getRowColData(i,5)!='')&&(IDInfoGrid.getRowColData(i,4)!=null&&IDInfoGrid.getRowColData(i,4)!='')){
|
|
if(IDInfoGrid.getRowColData(i,5)<IDInfoGrid.getRowColData(i,4)){
|
|
i18nAlert("证件有效起期需小于证件有效止期!", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
if (IDInfoGrid.getRowColData(i, 1) == '6'){
|
|
if (!validateUSCC(IDInfoGrid.getRowColData(i, 3))) {
|
|
i18nAlert("统一社会信用代码格式不正确!", "LIS-99999");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
function validateUSCC(uscc) {
|
|
// 基础格式校验
|
|
if (!/^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/.test(uscc)) {
|
|
return false;
|
|
}
|
|
|
|
// 字符-数值映射表
|
|
const charMap = {
|
|
'0':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9,
|
|
'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15, 'G':16, 'H':17,
|
|
'J':18, 'K':19, 'L':20, 'M':21, 'N':22,
|
|
'P':23, 'Q':24, 'R':25, 'T':26,
|
|
'U':27, 'W':28, 'X':29, 'Y':30
|
|
};
|
|
|
|
// 加权因子
|
|
const weights = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];
|
|
|
|
// 前17位字符值
|
|
const values = [];
|
|
for (let i = 0; i < 17; i++) {
|
|
const char = uscc.charAt(i);
|
|
values.push(charMap[char]);
|
|
}
|
|
|
|
// 加权求和
|
|
let total = 0;
|
|
for (let i = 0; i < 17; i++) {
|
|
total += values[i] * weights[i];
|
|
}
|
|
|
|
// 计算校验码
|
|
const checkCodeIndex = (31 - (total % 31)) % 31;
|
|
const checkCode = Object.keys(charMap)[checkCodeIndex];
|
|
|
|
// 比对校验码
|
|
return uscc.charAt(17) === checkCode;
|
|
}
|
|
// function validateSocialCreditCode(code) {
|
|
// // 基础校验:输入类型、长度、字符格式
|
|
// if (typeof code !== 'string' || code.length !== 18) return false;
|
|
// code = code.toUpperCase(); // 统一转大写
|
|
// const reg = /^[0-9A-Z]{17}[0-9A-Y]$/; // 前17位允许数字/字母,第18位排除字母Z
|
|
// if (!reg.test(code)) return false;
|
|
//
|
|
// // 权重数组(GB 32100-2015标准)
|
|
// const weights = [1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28];
|
|
//
|
|
// // 计算前17位的加权和
|
|
// let sum = 0;
|
|
// for (let i = 0; i < 17; i++) {
|
|
// const char = code[i];
|
|
// const value = /[0-9]/.test(char)
|
|
// ? parseInt(char, 10) // 数字直接转数值
|
|
// : char.charCodeAt(0) - 'A'.charCodeAt(0) + 10; // 字母按A=10, B=11...转换
|
|
// sum += value * weights[i];
|
|
// }
|
|
//
|
|
// // 计算校验码
|
|
// const mod = sum % 31;
|
|
// const checkCodeValue = (31 - mod) % 31; // 计算校验码对应数值
|
|
//
|
|
// // 数值转字符(0-9对应数字,10-30转A-Y)
|
|
// const correctChar = checkCodeValue <= 9
|
|
// ? String(checkCodeValue)
|
|
// : String.fromCharCode(checkCodeValue - 10 + 'A'.charCodeAt(0));
|
|
//
|
|
// // 返回校验结果
|
|
// return code[17] === correctChar;
|
|
// }
|
|
// function checkBusinessArea(){
|
|
// if(!BusinessAreaGrid.checkValue("BusinessAreaGrid")){
|
|
// return false;
|
|
// }
|
|
//
|
|
// var tAreaRow = BusinessAreaGrid.mulLineCount;
|
|
// var tAreaRate = 0;
|
|
// var tAreaRate2 =0;
|
|
// for(var i=0;i<tAreaRow;i++){
|
|
// if(BusinessAreaGrid.getRowColData(i,1)==null||BusinessAreaGrid.getRowColData(i,1)==''){
|
|
// i18nAlert("请输入业绩归属地【归属地代码】!", "LIS-01815");
|
|
// return false;
|
|
// }
|
|
//
|
|
// if(BusinessAreaGrid.getRowColData(i,3)==null||BusinessAreaGrid.getRowColData(i,3)==''){
|
|
// i18nAlert("请输入业绩归属地【归属比例】!", "LIS-01816");
|
|
// return false;
|
|
// }
|
|
//
|
|
// if(BusinessAreaGrid.getRowColData(i,3)>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;j<tAreaRow;j++){
|
|
// if(BusinessAreaGrid.getRowColData(i,4)==BusinessAreaGrid.getRowColData(j,4)){
|
|
// i18nAlert("请勿录入重复【归属地客户经理代码】!", "LIS-01823");
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// return true;
|
|
// }
|
|
|
|
function checkAgentCom(){
|
|
if(!AgentComGrid.checkValue("AgentComGrid")){
|
|
return false;
|
|
}
|
|
|
|
var tComRow = AgentComGrid.mulLineCount;
|
|
|
|
for(var i=0;i<tComRow;i++){
|
|
|
|
if(AgentComGrid.getRowColData(i,1)==null||AgentComGrid.getRowColData(i,1)==''){
|
|
i18nAlert("请输入中介机构编码!", "LIS-03917");
|
|
return false;
|
|
}
|
|
|
|
if(AgentComGrid.getRowColData(i,3)==null||AgentComGrid.getRowColData(i,3)==''){
|
|
alert("请输入中介代理人代码!");
|
|
return false;
|
|
}
|
|
|
|
// if(AgentComGrid.getRowColData(i,1)!=""){
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContSql");
|
|
// tSQLInfo.setModule("grp_common");
|
|
// tSQLInfo.setSqlId("LCContSql26");
|
|
// tSQLInfo.addSubPara(AgentComGrid.getRowColData(i,1));
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// var tAgentState = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
//
|
|
// if (tAgentState==null || tAgentState[0][0]!="1") {
|
|
// if(tBFFlag=="1"){
|
|
// i18nAlert("中介机构【{0}】许可证不存在或者不在有效期!", "LIS-01824", AgentComGrid.getRowColData(i,1));
|
|
// return false;
|
|
// }else {
|
|
// if(!i18nConfirm("中介机构【{0}】许可证不存在或者不在有效期!是否继续?", "LIS-17846", AgentComGrid.getRowColData(i,1))){
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
// if(AgentComGrid.getRowColData(i,4)==""){
|
|
// AgentComGrid.setRowColData(i,3,"");
|
|
// AgentComGrid.setRowColData(i,5,"");
|
|
// }
|
|
//
|
|
// if(AgentComGrid.getRowColData(i,3)!=null && AgentComGrid.getRowColData(i,3)!=""){
|
|
//
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContSql");
|
|
// tSQLInfo.setModule("grp_common");
|
|
// tSQLInfo.setSqlId("LCContSql25");
|
|
// tSQLInfo.addSubPara(AgentComGrid.getRowColData(i,3));
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// tSQLInfo.addSubPara(tValCheckDate);
|
|
// var tAgentState = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
//
|
|
// if (tAgentState==null || tAgentState[0][0]!="1") {
|
|
//
|
|
// if(tBFFlag=="1"){
|
|
// i18nAlert("中介机构代理人【{0}】资格证不存在或者不在有效期!", "LIS-01825", AgentComGrid.getRowColData(i,3));
|
|
// return false;
|
|
// } else {
|
|
// if(!i18nConfirm("中介机构代理人【{0}】资格证不存在或者不在有效期!是否继续?", "LIS-00874", AgentComGrid.getRowColData(i,3))){
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
for(var j=i+1;j<tComRow;j++){
|
|
if(AgentComGrid.getRowColData(i,3)!="" && AgentComGrid.getRowColData(i,3)!=null
|
|
&& AgentComGrid.getRowColData(j,3)!="" && AgentComGrid.getRowColData(j,3)!=null
|
|
&& AgentComGrid.getRowColData(i,3)==AgentComGrid.getRowColData(j,3)){
|
|
i18nAlert("请勿录入重复【中介代理人代码】!", "LIS-01826");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
//
|
|
// function checkSalerInfo(){
|
|
//
|
|
// if(!SalerInfoGrid.checkValue("SalerInfoGrid")){
|
|
// return false;
|
|
// }
|
|
// var tSalerRow =SalerInfoGrid.mulLineCount;
|
|
// var tSalerRate=0;
|
|
//
|
|
// for(var i=0;i<tSalerRow;i++){
|
|
//
|
|
// if(SalerInfoGrid.getRowColData(i,1)==null||SalerInfoGrid.getRowColData(i,1)==''){
|
|
// i18nAlert("请输入代理人代码!", "LIS-01827");
|
|
// return false;
|
|
// }
|
|
//
|
|
// if(SalerInfoGrid.getRowColData(i,4)==null||SalerInfoGrid.getRowColData(i,4)==''){
|
|
// i18nAlert("请输入代理人【分佣比例】!", "LIS-01828");
|
|
// return false;
|
|
// }
|
|
//
|
|
// if(SalerInfoGrid.getRowColData(i,4)>1||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;j<tSalerRow;j++){
|
|
// if(SalerInfoGrid.getRowColData(i,1)==SalerInfoGrid.getRowColData(j,1)){
|
|
// i18nAlert("请勿录入重复【代理人代码】!", "LIS-01831");
|
|
// return false;
|
|
// }
|
|
// }
|
|
// tSalerRate +=Number(SalerInfoGrid.getRowColData(i,4));
|
|
// }
|
|
//
|
|
// if(tSalerRate !=1){
|
|
// i18nAlert("代理人【分佣比例】之和应该等于1", "LIS-01832");
|
|
// return false;
|
|
// }
|
|
// return true;
|
|
// }
|
|
|
|
|
|
// 校验法人的证件号码
|
|
function checkCoridtype(){
|
|
|
|
if(document.all("CorID").value.length>0 && 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 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=='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")
|
|
downloadFile(filepath,tGrpPropNo+".pdf","../API/grp_common/jsp/download/APIDOWNLOAD");
|
|
// 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 = "<table class=common><tr class=common style='display:none'><td class=input></td><td class=input></td><td class=input></td><td class=input></td><td class=input></td><td class=input></td></tr>";
|
|
// var tInnerHTML0 = "<table class=common><tr class=common><td class=title></td><td class=input><td class=title></td><td class=input><td class=title></td><td class=input></tr>";
|
|
// var tInnerHTML1 = "<tr class=common><td class=title>工程明细</td><td class=input colspan=5 >";
|
|
//
|
|
// for (var i=0; i<tArr.length; i++) {
|
|
//
|
|
// tElementCode = tArr[i][0];
|
|
// tElementName = tArr[i][1];
|
|
// tControlFlag = tArr[i][2];
|
|
// tIsSelected = tArr[i][3];//用来判断是否被选中
|
|
// tOElementValue = tArr[i][4];//原始值
|
|
// tNElementValue = tArr[i][5];//询价值
|
|
//
|
|
// tInnerHTML1 += "<input type=checkbox name="+ tElementCode;
|
|
// if (tIsSelected=='0') {//询价表中没有保存该因子
|
|
//
|
|
// tInnerHTML1 += ">"+ tElementName;
|
|
// } else {//保存了该因子
|
|
//
|
|
// tInnerHTML1 += " checked>"+ tElementName;
|
|
// }
|
|
//
|
|
// if (tControlFlag=='1') {//存在录入框
|
|
//
|
|
// tInnerHTML1 += "<input type=hidden name=Hidden"+ tElementCode +" value="+ tControlFlag +"><input style='width:90px' class=common name="+ tElementCode +"Value value="+ tNElementValue +">";
|
|
// } else {
|
|
// tInnerHTML1 += "<input type=hidden name=Hidden"+ tElementCode +" value=0>";
|
|
// }
|
|
// }
|
|
//
|
|
// tInnerHTML1 += "</td></tr></table>";
|
|
// 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 {
|
|
document.all("CityCode").value="";
|
|
document.all("CityName").value="";
|
|
document.all("CountyName").value="";
|
|
document.all("CountyCode").value="";
|
|
}
|
|
} else if(o=="city"){
|
|
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 ("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{
|
|
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);
|
|
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;
|
|
}
|
|
}
|
|
|
|
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] <tCurrentDate) {
|
|
alert("该询价已过期,不允许提交投保单")
|
|
return false;
|
|
}
|
|
}
|
|
document.getElementById("fm").action = "../API/grp_nb/g_app/LCGrpContPolSave/UPDATE?Operate=SAVEPOLICY";
|
|
document.all("Operate").value = "SAVEPOLICY";
|
|
submitForm(fm,"SAVEPOLICY",true);
|
|
}
|
|
|
|
function calEndDate(code, type) {
|
|
|
|
if (fm.IDType.value == '0' && type == "IDType") {
|
|
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.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/UPDATE?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'){
|
|
tSQLInfo.setSqlId("LCContSql211");
|
|
}
|
|
if(tContPlanType == '01'){
|
|
tSQLInfo.setSqlId("LCContSql212");
|
|
}
|
|
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
initRiskGrid();
|
|
turnPage7.queryModal(tSQLInfo.getString(), RiskGrid, 1, 1);
|
|
|
|
// if(RiskGrid.mulLineCount>=10){
|
|
// divQueryInfoPage.style.display = "";
|
|
// }else {
|
|
// divQueryInfoPage.style.display = "none";
|
|
// }
|
|
}
|
|
|
|
function queryRiskInfo1(){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql209");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
initRiskInfoGrid();
|
|
turnPage7.queryModal(tSQLInfo.getString(), RiskInfoGrid, 1, 1);
|
|
}
|
|
// 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";
|
|
}
|
|
|
|
|
|
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;
|
|
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<tAreaRow;i++){
|
|
// if(BusinessAreaGrid.getRowColData(i,1)!=null&&BusinessAreaGrid.getRowColData(i,1)!=""){
|
|
// salManageCom = salManageCom + "|"+BusinessAreaGrid.getRowColData(i,1) +"";
|
|
// }
|
|
// }
|
|
// var tSelNo = SalerInfoGrid.lastFocusRowNo;//行号从0开始
|
|
// var strUrl = "LCGrpQuerySalerInfoMain.jsp?SelNo="+tSelNo+"&Flag=1&ManageCom="+salManageCom;
|
|
// window.open(strUrl,"代理人查询",'height=600,width=900,left=0,top=0,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
|
|
// }
|
|
|
|
/**
|
|
*检查保险期间
|
|
*/
|
|
function checkPeriod(){
|
|
|
|
var tInsuPeriod = document.all("InsuPeriod").value;
|
|
if(parseInt(tInsuPeriod)<=0){
|
|
i18nAlert("请录入大于0的数值", "LIS-01987");
|
|
return false;
|
|
}
|
|
if(document.all("ValDateType").value==''){
|
|
i18nAlert("请选择生效日期类型", "LIS-01988");
|
|
document.all("ValDateType").focus();
|
|
return false;
|
|
}
|
|
if(document.all("ValDateType").value=='1'&&document.all("ValDate").value==''){
|
|
i18nAlert("请录入生效日期", "LIS-01989");
|
|
document.all("ValDate").focus();
|
|
return false;
|
|
}
|
|
if(document.all("ValDateType").value=='1'){
|
|
tValCheckDate = document.all("ValDate").value;
|
|
}
|
|
if(document.all("ValDateType").value=='1'&&document.all("ValDate").value!=''){
|
|
var ValDate = new Date(document.all("ValDate").value);
|
|
var SysDate =new Date();
|
|
var diffTime1 = Math.abs(ValDate-SysDate);
|
|
var diffDays1 = Math.ceil(diffTime1/(1000*60*60*24));
|
|
var diffTime2 = Math.abs(SysDate-ValDate);
|
|
var diffDays2 = Math.ceil(diffTime2/(1000*60*60*24));
|
|
if(ValDate > 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;
|
|
// }
|
|
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 = "<table><tr><td class=common><img src='../common/images/butExpand.gif' style='cursor:hand;' onclick='showPage(this, divRelaPayInfo);'></td><td class=titleImg>合规关联</td></tr></table>";
|
|
// var tInnerHTML1 = "<div id='divRelaPayInfo'><table class=common>";
|
|
//
|
|
// for (var i=0; i<tArr.length; i++) {
|
|
//
|
|
// CheckCode = tArr[i][0];
|
|
// CheckName = tArr[i][0];
|
|
// CheckDesc = tArr[i][1];
|
|
// var CheckValue="";
|
|
// var Checked="";
|
|
//
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_app.LCContSql");
|
|
// tSQLInfo.setModule("grp_common");
|
|
// tSQLInfo.setSqlId("LCContSql30");
|
|
// tSQLInfo.addSubPara(CheckCode);
|
|
// tSQLInfo.addSubPara(tGrpPropNo);
|
|
// tSQLInfo.addSubPara("NB");
|
|
//
|
|
// var tArrArg = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
// if(tArrArg!=null && tArrArg[0][0]!=null){
|
|
// CheckValue = tArrArg[0][0];
|
|
// if(CheckValue=="1"){
|
|
// Checked="checked";
|
|
// }else {
|
|
// Checked="";
|
|
// }
|
|
// }
|
|
//
|
|
// if(i%3==0){
|
|
// tInnerHTML1 += "<tr class=common>";
|
|
// }
|
|
// tInnerHTML1 += "<td class=common><input class=checkbox type=checkbox id=Hidden"+ CheckCode +" name=Check"+ CheckName +" value='"+CheckValue+"' "+Checked+" onclick='setRelaFlag(this);'>"+ CheckDesc +"</td>";
|
|
// if((i+1)%3==0){
|
|
// tInnerHTML1 += "</tr>";
|
|
// }
|
|
// }
|
|
// 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 += "<table class=common><table class=common><tr class= common><td class= title>合规备注说明</td></tr><tr class= common><td class=title><textarea name='Para13' cols='110' rows='3' class='common' >"+remarks+"</textarea></td></tr></table><hr size='2' color='#D7E1F6' /></div>";
|
|
// 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 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;
|
|
}
|
|
|
|
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(){
|
|
|
|
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<arr2.length;i++){
|
|
if(GrpName.match(arr2[i][0])){
|
|
alert("经查询,该客户名称与关联方库匹配存在相似关键字'"+arr2[i][0]+"',请进行人工评估");
|
|
numFlag += 1;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
tSQLInfo2 = new SqlClass();
|
|
tSQLInfo2.setResourceName("g_app.LCContSql");
|
|
tSQLInfo2.setModule("grp_common");
|
|
tSQLInfo2.setSqlId("LCContSql52");
|
|
var arr3 = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
|
|
if(arr3!=null){
|
|
for(var i=0;i<arr3.length;i++){
|
|
if(GrpName.match(arr3[i][0])){
|
|
alert("经查询,该客户名称与关联方库匹配存在相似关键字'"+arr3[i][0]+"',请进行人工评估");
|
|
numFlag += 1;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
tSQLInfo2 = new SqlClass();
|
|
tSQLInfo2.setResourceName("g_app.LCContSql");
|
|
tSQLInfo2.setModule("grp_common");
|
|
tSQLInfo2.setSqlId("LCContSql53");
|
|
var arr4 = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
|
|
if(arr4!=null){
|
|
for(var i=0;i<arr4.length;i++){
|
|
if(GrpName.match(arr4[i][0])){
|
|
alert("经查询,该客户名称与关联方库匹配存在相似关键字,请进行人工评估");
|
|
numFlag += 1;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(numFlag == 0) {
|
|
alert("无匹配,请进行人工评估");
|
|
return;
|
|
}
|
|
}
|
|
function InsureListProtect1(){
|
|
|
|
|
|
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+"&QuotType="+tQuotType
|
|
+"&MissionID="+fm.MissionID.value+"&ActivityID="+fm.ActivityID.value+"&SubMissionID="+fm.SubMissionID.value+"&Flag=1&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{
|
|
if(tFlag=="5"||tFlag=="4"){
|
|
var strUrl ="./LCCompInsuredInfoMain.jsp?GrpPropNo="+ tGrpPropNo+"&ContPlanType="+tContPlanType+"&QuotNo="+tQuotNo+"&QuotType="+tQuotType
|
|
+"&MissionID="+fm.MissionID.value+"&ActivityID="+fm.ActivityID.value+"&SubMissionID="+fm.SubMissionID.value+"&Flag=1&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');
|
|
return true;
|
|
}
|
|
alert("请先选择投保方案,再进行人员清单维护");
|
|
return false;
|
|
}
|
|
|
|
}
|
|
function queryPrintCount(){
|
|
tSQLInfo2 = new SqlClass();
|
|
tSQLInfo2.setResourceName("g_app.LCContSql");
|
|
tSQLInfo2.setModule("grp_common");
|
|
tSQLInfo2.setSqlId("LCContSql60");
|
|
if(tFlag == '5' || tFlag == '4'){
|
|
tSQLInfo2.addSubPara(tGrpContNo);
|
|
}else{
|
|
tSQLInfo2.addSubPara(tGrpPropNo);
|
|
}
|
|
var tArr = easyExecSql(tSQLInfo2.getString(), 1, 0, 1);
|
|
if(tArr!=null){
|
|
document.getElementById("PrintCount").value = tArr[0][0];
|
|
}
|
|
}
|
|
function initGrpContNo(){
|
|
if(tFlag == '5' || tFlag == '4'){
|
|
fm.GrpPropNo.value = tGrpContNo;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 查询人员分布
|
|
*/
|
|
function insuredStatistic(){
|
|
//不支持查询无名单
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setSqlId("LCContSql214");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var result = easyExecSql(tSQLInfo.getString());
|
|
if(result != null){
|
|
alert("不支持查询无名单");
|
|
return false;
|
|
}
|
|
window.open("./UWPersonQueryMain.jsp?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 insuredQuest(){
|
|
//不支持查询无名单
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setSqlId("LCContSql214");
|
|
tSQLInfo.addSubPara(tGrpPropNo);
|
|
var result = easyExecSql(tSQLInfo.getString());
|
|
if(result != null){
|
|
alert("不支持查询无名单");
|
|
return false;
|
|
}
|
|
window.open("./OccQuestQueryMain.jsp?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 showDonateContflag(){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCContSql");
|
|
tSQLInfo.setModule("grp_common");
|
|
tSQLInfo.setSqlId("LCContSql183");
|
|
tSQLInfo.addSubPara(fm.GrpPropNo.value);
|
|
var tRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
document.getElementById("DonateContflag1").style.display = '';
|
|
document.getElementById("DonateContflag2").style.display = '';
|
|
if(tRes!=null && tRes != ""){
|
|
fm.DonateContflag.value = tRes[0][0];
|
|
fm.DonateContflagName.value = tRes[0][1];
|
|
}
|
|
}
|
|
|
|
/**
|
|
** 投保申请日期应默认当前系统时间
|
|
**/
|
|
function showPolicyAppDate(){
|
|
var ValDate = new Date();
|
|
var PolicyAppDate =new Date(ValDate-1*60*60*24*1000);
|
|
var year = ValDate.getFullYear().toString().padStart(4,"0");
|
|
var month = (ValDate.getMonth()+1).toString().padStart(2,"0");
|
|
var day = ValDate.getDate().toString().padStart(2,"0");
|
|
|
|
document.all("PolicyAppDate").value =year+"-"+month+"-"+day;
|
|
//保单生效日默认收费次日生效
|
|
document.all("ValDateType").value = "0";
|
|
document.all("ValdateTypeName").value = "保费到账次日";
|
|
if(document.all("ValDateType").value=='0'){
|
|
valDatename.style.display="none";
|
|
valDatename1.style.display="none";
|
|
}else {
|
|
valDatename.style.display="";
|
|
valDatename1.style.display="";
|
|
}
|
|
|
|
//生成投保单保单分类信息置入默认值否
|
|
document.all("ProvincialMngFlag").value="0";
|
|
document.all("ProvincialMngFlagName").value="否";
|
|
document.all("GreenSign").value="*";
|
|
document.all("GreenSignName").value="非绿色项目";
|
|
document.all("EnterpriseFlag").value="0";
|
|
document.all("EnterpriseFlagName").value="否";
|
|
document.all("SCFInsuranceFlag").value="0";
|
|
document.all("SCFInsuranceFlagName").value="否";
|
|
document.all("ProductChainFlag").value="0";
|
|
document.all("ProductChainFlagName").value="否";
|
|
document.all("PowerGridFlag").value="0";
|
|
document.all("PowerGridFlagName").value="否";
|
|
document.all("NewEnergyFlag").value="0";
|
|
document.all("NewEnergyFlagName").value="否";
|
|
document.all("ElectricalBusi").value="0";
|
|
document.all("ElectricalBusiName").value="否";
|
|
}
|
|
|
|
|
|
|
|
function validateCertificateDate(birthday, startDate, endDate) {
|
|
// 计算年龄
|
|
const birthDate = new Date(birthday);
|
|
//年龄的计算是要按照证件起期-出生日期来算年龄
|
|
// const today = new Date();
|
|
const today = new Date(startDate);
|
|
let age = today.getFullYear() - birthDate.getFullYear();
|
|
const monthDiff = today.getMonth() - birthDate.getMonth();
|
|
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
|
|
age--;
|
|
}
|
|
|
|
// 解析起止日期
|
|
const startYear = new Date(startDate).getFullYear();
|
|
const endYear = new Date(endDate).getFullYear();
|
|
const yearDiff = endYear - startYear;
|
|
|
|
// 根据年龄校验规则
|
|
if (age < 16) {
|
|
return yearDiff === 5;
|
|
} else if (age >= 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 showQuotInfo() {
|
|
|
|
var tSrc = "../g_quot/LSQuotQueryInput.jsp?ShowFlag=Edor&PrtNo=" + tGrpContNo;
|
|
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');
|
|
}
|
|
|
|
/**
|
|
* 投保单操作轨迹查询
|
|
*/
|
|
function grpOperationQuery(){
|
|
window.open("./GrpRecordQueryMain.jsp?GrpPropNo="+tGrpContNo,"投保单操作轨迹查询",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
}
|
|
|
|
/**
|
|
* 交费查询
|
|
*/
|
|
function feeQueryClick(){
|
|
window.open("./GrpRelFeeQuery.jsp?GrpPropNo="+tGrpPropNo+"&GrpName="+fm.GrpName.value,"交费查询",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
} |