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.
1588 lines
67 KiB
1588 lines
67 KiB
/***************************************************************
|
|
* <p>ProName:EdorACInput.js</p>
|
|
* <p>Title: 投保人资料变更</p>
|
|
* <p>Description:投保人资料变更</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : caiyc
|
|
* @version : 8.0
|
|
* @date : 2014-06-13
|
|
****************************************************************/
|
|
|
|
var showInfo;
|
|
var turnPage = new turnPageClass();
|
|
var turnPage1 = new turnPageClass();
|
|
var turnPage2 = new turnPageClass();
|
|
var turnPage3 = new turnPageClass();
|
|
var turnPage4 = new turnPageClass();
|
|
var turnPage5 = new turnPageClass();
|
|
var turnPage6 = new turnPageClass();
|
|
var mOperate = "";//操作状态
|
|
var tSQLInfo = new SqlClass();
|
|
|
|
|
|
function selectPeopleInfo() {
|
|
|
|
if (document.all("LinkMan").value == '' || document.all("Phone2").value == '') {
|
|
i18nAlert("请先录入联系人信息才能勾选!", "LIS-01598");
|
|
document.all("TooContect").checked = false;
|
|
return false;
|
|
}
|
|
|
|
if (divLinkPeopleInfo.style.display == 'none') {
|
|
divLinkPeopleInfo.style.display = '';
|
|
} else {
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
//原被保险人信息查询
|
|
function queryOldClick() {
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql2");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry == null) {
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql1");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
|
|
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (arrResult != null) {
|
|
|
|
if (arrResult[0][0] == 'POS') {
|
|
|
|
// 查询投保人信息表
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql3");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
document.all("GrpName").value = tPropEntry[0][0];
|
|
document.all("SumNumPeople").value = tPropEntry[0][1];
|
|
document.all("MainBusiness").value = tPropEntry[0][2];
|
|
document.all("GrpNature").value = tPropEntry[0][3];
|
|
document.all("GrpNatureName").value = tPropEntry[0][4];
|
|
document.all("BusiCategory").value = tPropEntry[0][5];
|
|
document.all("BusiCategoryName").value = tPropEntry[0][6];
|
|
// document.all("SocialInsuCode").value=tPropEntry[0][7];
|
|
document.all("Phone1").value = tPropEntry[0][8];
|
|
// document.all("Fax").value=tPropEntry[0][9];
|
|
document.all("Corporation").value = tPropEntry[0][10];
|
|
document.all("CorIDType").value = tPropEntry[0][11];
|
|
document.all("CorIDTypeName").value = tPropEntry[0][12];
|
|
document.all("CorID").value = tPropEntry[0][13];
|
|
document.all("CorIDExpiryDate").value = tPropEntry[0][14];
|
|
document.all("AppntNo").value = tPropEntry[0][15];
|
|
}
|
|
|
|
//初始化省市县
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql7");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
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];
|
|
}
|
|
|
|
//初始化联系人信息
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql9");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
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("IDEndDate").value = tPropEntry[0][8];
|
|
}
|
|
|
|
//银行信息初始化
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql19");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
|
|
var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (kPropEntry != null) {
|
|
|
|
document.all("AccName").value = kPropEntry[0][2];
|
|
document.all("BankAccNo").value = kPropEntry[0][3];
|
|
document.all("PayType").value = kPropEntry[0][4];
|
|
document.all("PayTypeName").value = kPropEntry[0][5];
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql20");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (kPropEntry != null) {
|
|
document.all("HeadBankCode").value = kPropEntry[0][0];
|
|
document.all("BankCodeName").value = kPropEntry[0][1];
|
|
document.all("BankProvince").value = kPropEntry[0][2];
|
|
document.all("BankProvinceName").value = kPropEntry[0][3];
|
|
document.all("BankCity").value = kPropEntry[0][4];
|
|
document.all("BankCityName").value = kPropEntry[0][5];
|
|
|
|
}
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql21");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
tSQLInfo.addSubPara("00");
|
|
|
|
var tIDRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tIDRes != null) {
|
|
|
|
document.all("GrpIDType").value = tIDRes[0][0];
|
|
document.all("GrpIDTypeName").value = tIDRes[0][1];
|
|
document.all("GrpID").value = tIDRes[0][2];
|
|
document.all("GrpIDStartDate").value = tIDRes[0][3];
|
|
document.all("GrpIDExpiryDate").value = tIDRes[0][4];
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql21");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
tSQLInfo.addSubPara("01");
|
|
|
|
turnPage5.queryModal(tSQLInfo.getString(), IDInfoGrid, 1, 1);
|
|
if (turnPage5.strQueryResult == false) {
|
|
|
|
document.all("IDInfo").checked = false;
|
|
divIDInfo.style.display = 'none';
|
|
} else {
|
|
|
|
document.all("IDInfo").checked = true;
|
|
divIDInfo.style.display = '';
|
|
}
|
|
|
|
//多联系人
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql15");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
tSQLInfo.addSubPara(arrResult[0][4]);
|
|
|
|
turnPage6.queryModal(tSQLInfo.getString(), TooContectGrid, 1, 1);
|
|
|
|
if (turnPage6.strQueryResult == false) {
|
|
|
|
document.all("TooContect").checked = false;
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
} else if (arrResult[0][0] == 'NB') {
|
|
|
|
// 投保人信息表
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql4");
|
|
tSQLInfo.addSubPara(arrResult[0][1]);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
document.all("GrpName").value = tPropEntry[0][0];
|
|
document.all("SumNumPeople").value = tPropEntry[0][1];
|
|
document.all("MainBusiness").value = tPropEntry[0][2];
|
|
document.all("GrpNature").value = tPropEntry[0][3];
|
|
document.all("GrpNatureName").value = tPropEntry[0][4];
|
|
document.all("BusiCategory").value = tPropEntry[0][5];
|
|
document.all("BusiCategoryName").value = tPropEntry[0][6];
|
|
// document.all("SocialInsuCode").value=tPropEntry[0][7];
|
|
document.all("Phone1").value = tPropEntry[0][8];
|
|
// document.all("Fax").value=tPropEntry[0][9];
|
|
document.all("Corporation").value = tPropEntry[0][10];
|
|
document.all("CorIDType").value = tPropEntry[0][11];
|
|
document.all("CorIDTypeName").value = tPropEntry[0][12];
|
|
document.all("CorID").value = tPropEntry[0][13];
|
|
document.all("CorIDExpiryDate").value = tPropEntry[0][14];
|
|
document.all("AppntNo").value = tPropEntry[0][15];
|
|
}
|
|
|
|
//初始化省市县
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql5");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
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];
|
|
}
|
|
|
|
//初始化联系人信息
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql6");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
|
|
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("IDEndDate").value = tPropEntry[0][8];
|
|
}
|
|
|
|
//银行信息初始化
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql18");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
|
|
var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (kPropEntry != null) {
|
|
|
|
document.all("AccName").value = kPropEntry[0][1];
|
|
document.all("BankAccNo").value = kPropEntry[0][2];
|
|
document.all("PayType").value = kPropEntry[0][3];
|
|
document.all("PayTypeName").value = kPropEntry[0][4];
|
|
|
|
if (kPropEntry[0][0] != "") {
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql17");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
|
|
var kBankEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (kBankEntry != null) {
|
|
document.all("HeadBankCode").value = kBankEntry[0][0];
|
|
document.all("BankCodeName").value = kBankEntry[0][1];
|
|
document.all("BankProvince").value = kBankEntry[0][2];
|
|
document.all("BankProvinceName").value = kBankEntry[0][3];
|
|
document.all("BankCity").value = kBankEntry[0][4];
|
|
document.all("BankCityName").value = kBankEntry[0][5];
|
|
}
|
|
}
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql13");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara("00");
|
|
|
|
var tIDRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tIDRes != null) {
|
|
document.all("GrpIDType").value = tIDRes[0][0];
|
|
document.all("GrpIDTypeName").value = tIDRes[0][1];
|
|
document.all("GrpID").value = tIDRes[0][2];
|
|
document.all("GrpIDStartDate").value = tIDRes[0][3];
|
|
document.all("GrpIDExpiryDate").value = tIDRes[0][4];
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql13");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara("01");
|
|
turnPage5.queryModal(tSQLInfo.getString(), IDInfoGrid, 1, 1);
|
|
|
|
if (!turnPage5.strQueryResult) {
|
|
initIDInfoGrid();
|
|
document.all("IDInfo").checked = false;
|
|
divIDInfo.style.display = 'none';
|
|
} else {
|
|
document.all("IDInfo").checked = true;
|
|
divIDInfo.style.display = '';
|
|
}
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql14");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
turnPage6.queryModal(tSQLInfo.getString(), TooContectGrid, 1, 1);
|
|
|
|
if (!turnPage6.strQueryResult) {
|
|
initTooContectGrid();
|
|
document.all("TooContect").checked = false;
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql3");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
document.all("GrpName").value = tPropEntry[0][0];
|
|
document.all("SumNumPeople").value = tPropEntry[0][1];
|
|
document.all("MainBusiness").value = tPropEntry[0][2];
|
|
document.all("GrpNature").value = tPropEntry[0][3];
|
|
document.all("GrpNatureName").value = tPropEntry[0][4];
|
|
document.all("BusiCategory").value = tPropEntry[0][5];
|
|
document.all("BusiCategoryName").value = tPropEntry[0][6];
|
|
// document.all("SocialInsuCode").value=tPropEntry[0][7];
|
|
document.all("Phone1").value = tPropEntry[0][8];
|
|
// document.all("Fax").value=tPropEntry[0][9];
|
|
document.all("Corporation").value = tPropEntry[0][10];
|
|
document.all("CorIDType").value = tPropEntry[0][11];
|
|
document.all("CorIDTypeName").value = tPropEntry[0][12];
|
|
document.all("CorID").value = tPropEntry[0][13];
|
|
document.all("CorIDExpiryDate").value = tPropEntry[0][14];
|
|
document.all("AppntNo").value = tPropEntry[0][15];
|
|
}
|
|
|
|
//初始化省市县
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql7");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
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];
|
|
}
|
|
|
|
//初始化联系人信息
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql9");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null) {
|
|
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("IDEndDate").value = tPropEntry[0][8];
|
|
}
|
|
|
|
//银行信息初始化
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql19");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (kPropEntry != null) {
|
|
|
|
document.all("AccName").value = kPropEntry[0][1];
|
|
document.all("BankAccNo").value = kPropEntry[0][2];
|
|
document.all("PayType").value = kPropEntry[0][3];
|
|
document.all("PayTypeName").value = kPropEntry[0][4];
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql20");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
|
|
var kPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (kPropEntry != null) {
|
|
document.all("HeadBankCode").value = kPropEntry[0][0];
|
|
document.all("BankCodeName").value = kPropEntry[0][1];
|
|
document.all("BankProvince").value = kPropEntry[0][2];
|
|
document.all("BankProvinceName").value = kPropEntry[0][3];
|
|
document.all("BankCity").value = kPropEntry[0][4];
|
|
document.all("BankCityName").value = kPropEntry[0][5];
|
|
}
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql21");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
tSQLInfo.addSubPara("00");
|
|
|
|
var tIDRes = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tIDRes != null) {
|
|
document.all("GrpIDType").value = tIDRes[0][0];
|
|
document.all("GrpIDTypeName").value = tIDRes[0][1];
|
|
document.all("GrpID").value = tIDRes[0][2];
|
|
document.all("GrpIDStartDate").value = tIDRes[0][3];
|
|
document.all("GrpIDExpiryDate").value = tIDRes[0][4];
|
|
}
|
|
|
|
//单位证件
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql21");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
tSQLInfo.addSubPara("01");
|
|
|
|
turnPage5.queryModal(tSQLInfo.getString(), IDInfoGrid, 1, 1);
|
|
if (turnPage5.strQueryResult == false) {
|
|
document.all("IDInfo").checked = false;
|
|
divIDInfo.style.display = 'none';
|
|
} else {
|
|
document.all("IDInfo").checked = true;
|
|
divIDInfo.style.display = '';
|
|
}
|
|
|
|
//多联系人
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql15");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
turnPage6.queryModal(tSQLInfo.getString(), TooContectGrid, 1, 1);
|
|
|
|
if (turnPage7.strQueryResult == false) {
|
|
document.all("TooContect").checked = false;
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//保存
|
|
function saveClick() {
|
|
|
|
// IDInfoGrid.delBlankLine();
|
|
TooContectGrid.delBlankLine();
|
|
if (!verifyForm("fm")) {
|
|
return false;
|
|
}
|
|
|
|
if (document.all("GrpName").value.length > 150) {
|
|
i18nAlert("投保人名称不符合规定的输入长度!长度需要小于150!", null);
|
|
return false;
|
|
}
|
|
|
|
// if(!validateUSCC()){
|
|
// i18nAlert("统一社会信用代码格式不正确!", "LIS-99999");
|
|
// return false;
|
|
// }
|
|
|
|
if (document.all("GrpIDStartDate").value > document.all("GrpIDExpiryDate").value) {
|
|
i18nAlert("单位证件有效起期不能晚于单位证件有效止期!", "LIS-BQ-0095");
|
|
return false;
|
|
}
|
|
if (document.all("GrpIDExpiryDate").value < tCurrentDate) {
|
|
i18nAlert("单位证件有效止期必须大于当前日期!", "LIS-BQ-0096");
|
|
return false;
|
|
}
|
|
|
|
// if (document.all("SumNumPeople").value.length > 9) {
|
|
// alert("员工总数有误,请核对!");
|
|
// return false;
|
|
// }
|
|
|
|
// if (document.all("AllOnWorkPeoples").value.length > 9) {
|
|
// alert("《在职人数》有误,请核对!");
|
|
// return false;
|
|
// }
|
|
// if (document.all("AllOffWorkPeoples").value.length > 9) {
|
|
// alert("《退休人数》有误,请核对!");
|
|
// return false;
|
|
// }
|
|
// if (document.all("MainInsuPeoples").value.length > 9) {
|
|
// alert("《主被保险》人数有误,请核对!");
|
|
// return false;
|
|
// }
|
|
// if (document.all("RelaInsuPeoples").value.length > 9) {
|
|
// alert("《附属被保险》人数有误,请核对!");
|
|
// return false;
|
|
// }
|
|
// if (document.all("SumInsuPeoples").value.length > 9) {
|
|
// alert("《合计人数》有误,请核对!");
|
|
// return false;
|
|
// }
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql22");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara("110000");
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tPropEntry != null && tPropEntry[0][0] == "1") {
|
|
// if(document.all("SocialInsuCode").value==''){
|
|
// i18nAlert("管理机构为北京分公司的保单【社会保险登记号】不能为空!", "LIS-01599");
|
|
// return false;
|
|
// }
|
|
}
|
|
|
|
if (document.all("CorIDType").value != '') {
|
|
if (document.all("CorID").value == '') {
|
|
i18nAlert("请录入法人证件号码!", "LIS-01600");
|
|
return false;
|
|
}
|
|
|
|
if (document.all("CorIDType").value == "0") {
|
|
// if (!checkIDDate(document.all("CorIDStartDate").value, document.all("CorIDExpiryDate").value, 1)) {
|
|
// return;
|
|
// }
|
|
}
|
|
}
|
|
|
|
if (document.all("IDType").value != '') {
|
|
if (document.all("IDNo").value == '') {
|
|
i18nAlert("请录入经办人证件号码!", "LIS-01601");
|
|
return false;
|
|
}
|
|
if (document.all("IDType").value == "0") {
|
|
// if (!checkIDDate(document.all("IDStartDate").value, document.all("IDEndDate").value, 2)) {
|
|
// return;
|
|
// }
|
|
}
|
|
}
|
|
if (document.all("DetailAddress").value == "") {
|
|
i18nAlert("请录入完整的单位地址信息!", "LIS-01602");
|
|
return false;
|
|
}
|
|
if (document.all("ProvinceCode").value != "") {
|
|
if (document.all("CityCode").value == "" || document.all("CountyCode").value == "" || document.all("DetailAddress").value == "") {
|
|
i18nAlert("详细地址必须录入市和区/县/详细信息!", "LIS-03654");
|
|
return false;
|
|
}
|
|
if (document.all("DetailAddress").value == "") {
|
|
i18nAlert("请录入完整的单位地址信息!", "LIS-01602");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
// 校验详细地址信息录入
|
|
if (!checkCity()) {
|
|
return false;
|
|
}
|
|
|
|
// 校验多联系人请勾选
|
|
if (document.all("TooContect").checked) {
|
|
TooContectGrid.delBlankLine();
|
|
var count = TooContectGrid.mulLineCount;
|
|
if (parseInt(count) == 0) {
|
|
i18nAlert("请填写联系人详细信息!", "LIS-01604");
|
|
return false;
|
|
}
|
|
// 校验多联系人信息
|
|
if (!valTooConterInfo()) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (document.all("CorIDExpiryDate").value != "") {
|
|
if (document.all("CorIDExpiryDate").value < tCurrentDate) {
|
|
i18nAlert("法人证件有效止期必须大于当前日期!", "LIS-01605");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (document.all("IDEndDate").value != "") {
|
|
if (document.all("IDEndDate").value < tCurrentDate) {
|
|
i18nAlert("联系人证件有效止期必须大于当前日期!", "LIS-01606");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
mOperate = "SAVE";
|
|
fm.action = "../API/grp_pa/g_pos/EdorACSave/ADD?Operate=" + mOperate + "&EdorType=" + tEdorType + "&EdorAppNo=" + tEdorAppNo + "&GrpContNo=" + tGrpContNo + "&MissionID=" + tMissionID + "&SubMissionID=" + tSubMissionID + "&ActivityID=" + tActivityID + "&EdorNo=" + tEdorNo;
|
|
submitFunc();
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
// initForm();
|
|
|
|
}
|
|
|
|
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 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 afterSubmit(FlagStr, content) {
|
|
|
|
if (typeof (showInfo) == "object" && typeof (showInfo) != "unknown") {
|
|
showInfo.close();
|
|
}
|
|
|
|
if (FlagStr == "Fail") {
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(content);
|
|
//showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
|
|
var name = '提示'; //网页名称,可为空;
|
|
var iWidth = 550; //弹出窗口的宽度;
|
|
var iHeight = 250; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(urlStr, name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
|
|
showInfo.focus();
|
|
} else {
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=S&content=" + encodeURIComponent(content);
|
|
//showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
|
|
var name = '提示'; //网页名称,可为空;
|
|
var iWidth = 550; //弹出窗口的宽度;
|
|
var iHeight = 250; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(urlStr, name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
|
|
showInfo.focus();
|
|
initForm();
|
|
}
|
|
}
|
|
|
|
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 != 18) {
|
|
i18nAlert("输入的法人/负责人身份证号位数错误!", null);
|
|
document.all('CorID').value = "";
|
|
return false;
|
|
}
|
|
if (!checkIdCard(document.all("CorID").value)) {
|
|
document.all('CorID').value = "";
|
|
document.all('CorID').className = "warn";
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* 校验身份证类型
|
|
*/
|
|
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 != 18)) {
|
|
i18nAlert("输入的经办人身份证号位数错误!", "");
|
|
document.all('IDNo').value = "";
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 校验多联系人信息
|
|
*/
|
|
function valTooConterInfo() {
|
|
var tCount = TooContectGrid.mulLineCount;
|
|
|
|
if (parseInt(tCount) > 0) {
|
|
if (!TooContectGrid.checkValue("TooContectGrid")) {
|
|
return false;
|
|
}
|
|
|
|
for (var i = 0; i < tCount; i++) {
|
|
|
|
var tTooName = TooContectGrid.getRowColData(i, 1);
|
|
var tTooPHONE = TooContectGrid.getRowColData(i, 2);
|
|
|
|
if (TooContectGrid.getRowColData(i, 10) != '') {
|
|
if (TooContectGrid.getRowColData(i, 7) == '') {
|
|
i18nAlert("第{0}行多联系人【证件类型】不为空需录入【证件号码】!", "LIS-01615", (i + 1));
|
|
return false;
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 10) == '0') {
|
|
if (TooContectGrid.getRowColData(i, 7).length != '18') {
|
|
i18nAlert("第{0}行多联系人【身份证号码】必须为18位!", "LIS-01616", (i + 1));
|
|
return false;
|
|
}
|
|
var mas = checkIdNO(TooContectGrid.getRowColData(i, 7));
|
|
if (mas.length > 0) {
|
|
alert("第" + i + 1 + "行多联系人" + mas);
|
|
return false;
|
|
}
|
|
|
|
}
|
|
if (TooContectGrid.getRowColData(i, 10) == "0") {
|
|
// if (!checkIDDate(TooContectGrid.getRowColData(i, 8), TooContectGrid.getRowColData(i, 9), 3)) {
|
|
// return;
|
|
// }
|
|
}
|
|
}
|
|
|
|
if (TooContectGrid.getRowColData(i, 7) != '') {
|
|
if (TooContectGrid.getRowColData(i, 10) == '') {
|
|
i18nAlert("第{0}行多联系人【证件号码】不为空需录入【证件类型】!", "LIS-01728", (i + 1));
|
|
//TooContectGrid.getRowColData(i,6)='';
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (TooContectGrid.getRowColData(i, 9) != '') {
|
|
|
|
if (TooContectGrid.getRowColData(i, 9) < tCurrentDate) {
|
|
i18nAlert("第{0}行多联系人有效止期需大于当前日期", "LIS-01729", (i + 1));
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//人员重复性校验
|
|
for (var j = i + 1; j < tCount; j++) {
|
|
var mTooName = TooContectGrid.getRowColData(j, 1);
|
|
var mTooPHONE = TooContectGrid.getRowColData(j, 2);
|
|
if (tTooName == mTooName && tTooPHONE == mTooPHONE) {
|
|
i18nAlert("第[{0}]行联系人与第[{1}]行联系人重复!", "LIS-01730", (i + 1), (j + 1));
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* 校验详细地址信息
|
|
*/
|
|
function checkCity() {
|
|
|
|
var ProvinceCode = document.all('ProvinceCode').value;
|
|
var CityCode = document.all('CityCode').value;
|
|
var CountyCode = document.all('CountyCode').value;
|
|
|
|
if (ProvinceCode != "") {
|
|
if (CityCode == '') {
|
|
CityCode = '0';
|
|
}
|
|
if (CountyCode == '') {
|
|
CountyCode = '0';
|
|
}
|
|
|
|
var tCheckCity = new SqlClass();
|
|
tCheckCity.setResourceName("g_pos.EdorACSql");
|
|
tCheckCity.setModule("grp_pa");
|
|
tCheckCity.setSqlId("EdorACSql50");
|
|
tCheckCity.addSubPara(ProvinceCode);
|
|
tCheckCity.addSubPara(CityCode);
|
|
tCheckCity.addSubPara(CountyCode);
|
|
|
|
var arrResult = easyExecSql(tCheckCity.getString());
|
|
if (arrResult == '0') {
|
|
i18nAlert("联系地址不存在或者关联不正确", "LIS-03657");
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* 下拉框选择后处理
|
|
*/
|
|
function afterCodeSelect(tSelectValue, tObj) {
|
|
|
|
if (tSelectValue == "province") {
|
|
if (tObj.name == "BankProvince") {
|
|
document.all("BankCity").value = "";
|
|
document.all("BankCityName").value = "";
|
|
} else {
|
|
|
|
document.all("CityName").value = "";
|
|
document.all("CityCode").value = "";
|
|
document.all("CountyName").value = "";
|
|
document.all("CountyCode").value = "";
|
|
}
|
|
} else if (tSelectValue == "city") {
|
|
|
|
if (tObj.name == "BankCity") {
|
|
|
|
} else {
|
|
document.all("CountyName").value = "";
|
|
document.all("CountyCode").value = "";
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// zhangyong 税收居民类型需求 2018-01-08 Start
|
|
function queryGrpAppntInfo() {
|
|
var mGrpContNo = tGrpContNo;//团体保单号
|
|
var mEdorAcceptNo = tEdorAcceptNo;//保全受理号
|
|
|
|
var tEdorStateSQL = new SqlClass();
|
|
tEdorStateSQL.setResourceName("g_pos.EdorACSql");
|
|
tEdorStateSQL.setModule("grp_pa");
|
|
tEdorStateSQL.setSqlId("EdorACSql54");
|
|
tEdorStateSQL.addSubPara(mEdorAcceptNo);
|
|
var tEdorStateRes = easyExecSql(tEdorStateSQL.getString(), 1, 0, 1);
|
|
var tEdorState = tEdorStateRes == null ? null : tEdorStateRes[0][0];
|
|
|
|
|
|
if (tEdorState == '0') {
|
|
//查询投保人基本资料信息
|
|
var BdetailSQL = new SqlClass();
|
|
BdetailSQL.setResourceName("g_pos.EdorACSql");
|
|
BdetailSQL.setModule("grp_pa");
|
|
BdetailSQL.setSqlId("EdorACSql32");//查询P表
|
|
BdetailSQL.addSubPara(mGrpContNo);
|
|
BdetailSQL.addSubPara(mEdorAcceptNo);
|
|
var mOldAppntInfo = easyExecSql(BdetailSQL.getString(), 1, 0, 1);
|
|
|
|
var detailSQL = new SqlClass();
|
|
detailSQL.setResourceName("g_pos.EdorACSql");
|
|
detailSQL.setModule("grp_pa");
|
|
detailSQL.setSqlId("EdorACSql26");//查询C表
|
|
detailSQL.addSubPara(mGrpContNo);
|
|
var mNewAppntInfo= easyExecSql(detailSQL.getString(), 1, 0, 1);
|
|
|
|
}else {var BdetailSQL = new SqlClass();
|
|
BdetailSQL.setResourceName("g_pos.EdorACSql");
|
|
BdetailSQL.setModule("grp_pa");
|
|
BdetailSQL.setSqlId("EdorACSql32");//查询P表
|
|
BdetailSQL.addSubPara(mGrpContNo);
|
|
BdetailSQL.addSubPara(mEdorAcceptNo);
|
|
var mNewAppntInfo = easyExecSql(BdetailSQL.getString(), 1, 0, 1);
|
|
|
|
var detailSQL = new SqlClass();
|
|
detailSQL.setResourceName("g_pos.EdorACSql");
|
|
detailSQL.setModule("grp_pa");
|
|
detailSQL.setSqlId("EdorACSql26");//查询C表
|
|
detailSQL.addSubPara(mGrpContNo);
|
|
var mOldAppntInfo = easyExecSql(detailSQL.getString(), 1, 0, 1);
|
|
}
|
|
//查询投保人基本资料信息
|
|
|
|
// if (tEdorState == '0') {
|
|
// AppntDetailInfo(mOldAppntInfo, mNewAppntInfo);
|
|
// } else {
|
|
AppntDetailInfo(mNewAppntInfo, mOldAppntInfo);//后 原
|
|
// }
|
|
|
|
//查询单位地址信息
|
|
var tBAddressSQL = new SqlClass();
|
|
tBAddressSQL.setResourceName("g_pos.EdorACSql");
|
|
tBAddressSQL.setModule("grp_pa");
|
|
tBAddressSQL.setSqlId("EdorACSql33");//查询P表
|
|
tBAddressSQL.addSubPara(mGrpContNo);
|
|
tBAddressSQL.addSubPara(mEdorAcceptNo);
|
|
var tBAddressInfo = easyExecSql(tBAddressSQL.getString(), 1, 0, 1);
|
|
|
|
var tAddressSQL = new SqlClass();
|
|
tAddressSQL.setResourceName("g_pos.EdorACSql");
|
|
tAddressSQL.setModule("grp_pa");
|
|
tAddressSQL.setSqlId("EdorACSql27");//查询C表
|
|
tAddressSQL.addSubPara(mGrpContNo);
|
|
var tAddressInfo = easyExecSql(tAddressSQL.getString(), 1, 0, 1);
|
|
|
|
if (tEdorState == '0') {
|
|
AppntAddressInfo(tAddressInfo, tBAddressInfo);
|
|
} else {
|
|
AppntAddressInfo(tBAddressInfo, tAddressInfo);
|
|
}
|
|
|
|
//查询单位证件信息
|
|
var tBGrpIDInfo = new SqlClass();
|
|
tBGrpIDInfo.setResourceName("g_pos.EdorACSql");
|
|
tBGrpIDInfo.setModule("grp_pa");
|
|
tBGrpIDInfo.setSqlId("EdorACSql34");//查询P表
|
|
tBGrpIDInfo.addSubPara(mGrpContNo);
|
|
tBGrpIDInfo.addSubPara("00");
|
|
tBGrpIDInfo.addSubPara(mEdorAcceptNo);
|
|
var tBIDRes = easyExecSql(tBGrpIDInfo.getString(), 1, 0, 1);
|
|
|
|
var tGrpIDInfo = new SqlClass();
|
|
tGrpIDInfo.setResourceName("g_pos.EdorACSql");
|
|
tGrpIDInfo.setModule("grp_pa");
|
|
tGrpIDInfo.setSqlId("EdorACSql28");//查询C表
|
|
tGrpIDInfo.addSubPara(mGrpContNo);
|
|
tGrpIDInfo.addSubPara("00");
|
|
var tIDRes = easyExecSql(tGrpIDInfo.getString(), 1, 0, 1);
|
|
|
|
if (tEdorState == '0') {
|
|
GrpIDInfo(tIDRes, tBIDRes);
|
|
} else {
|
|
GrpIDInfo(tBIDRes, tIDRes);
|
|
}
|
|
|
|
//初始化联系人信息
|
|
var tBLinkSQL = new SqlClass();
|
|
tBLinkSQL.setResourceName("g_pos.EdorACSql");
|
|
tBLinkSQL.setModule("grp_pa");
|
|
tBLinkSQL.setSqlId("EdorACSql35");//查询P表
|
|
tBLinkSQL.addSubPara(mGrpContNo);
|
|
tBLinkSQL.addSubPara(mEdorAcceptNo);
|
|
var tBLinkInfo = easyExecSql(tBLinkSQL.getString(), 1, 0, 1);
|
|
|
|
var tLinkSQL = new SqlClass();
|
|
tLinkSQL.setResourceName("g_pos.EdorACSql");
|
|
tLinkSQL.setModule("grp_pa");
|
|
tLinkSQL.setSqlId("EdorACSql29");//查询C表
|
|
tLinkSQL.addSubPara(mGrpContNo);
|
|
var tLinkInfo = easyExecSql(tLinkSQL.getString(), 1, 0, 1);
|
|
|
|
if (tEdorState == '0') {
|
|
LinkInfo(tLinkInfo, tBLinkInfo);
|
|
} else {
|
|
LinkInfo(tBLinkInfo, tLinkInfo);
|
|
}
|
|
|
|
//多联系人
|
|
var tSQLInfo2 = new SqlClass();
|
|
tSQLInfo2.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo2.setModule("grp_pa");
|
|
tSQLInfo2.setSqlId("EdorACSql15");//P表
|
|
tSQLInfo2.addSubPara(tGrpContNo);
|
|
tSQLInfo2.addSubPara(tEdorNo);
|
|
tSQLInfo2.addSubPara(tEdorType);
|
|
|
|
//多联系人
|
|
var tSQLInfo3 = new SqlClass();
|
|
tSQLInfo3.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo3.setModule("grp_pa");
|
|
tSQLInfo3.setSqlId("EdorACSql14");//C表
|
|
tSQLInfo3.addSubPara(tGrpContNo);
|
|
// tSQLInfo.addSubPara(tEdorNo);
|
|
// tSQLInfo.addSubPara(tEdorType);
|
|
|
|
if (tEdorState == '0'){
|
|
turnPage7.queryModal(tSQLInfo3.getString(), TooContectGrid, 1, 1);
|
|
if (turnPage7.strQueryResult == false) {
|
|
document.all("OldTooContect").checked = false;
|
|
divOldLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("OldTooContect").checked = true;
|
|
divOldLinkPeopleInfo.style.display = '';
|
|
}
|
|
|
|
// if (tEdorState != null && tEdorState == '0') {
|
|
// document.all("OldTooContect").checked = false;
|
|
// divOldLinkPeopleInfo.style.display = 'none';
|
|
// }
|
|
|
|
turnPage6.queryModal(tSQLInfo2.getString(), OldTooContectGrid, 1, 1);
|
|
if (turnPage6.strQueryResult == false) {
|
|
document.all("OldTooContect").checked = false;
|
|
turnPage6.queryModal(tSQLInfo3.getString(), TooContectGrid, 1, 1);
|
|
if (turnPage6.strQueryResult == false) {
|
|
document.all("TooContect").checked = false;
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
}else {
|
|
turnPage7.queryModal(tSQLInfo3.getString(), OldTooContectGrid, 1, 1);
|
|
if (turnPage7.strQueryResult == false) {
|
|
document.all("OldTooContect").checked = false;
|
|
divOldLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("OldTooContect").checked = true;
|
|
divOldLinkPeopleInfo.style.display = '';
|
|
}
|
|
|
|
// if (tEdorState != null && tEdorState == '0') {
|
|
// document.all("OldTooContect").checked = false;
|
|
// divOldLinkPeopleInfo.style.display = 'none';
|
|
// }
|
|
|
|
turnPage6.queryModal(tSQLInfo2.getString(), TooContectGrid, 1, 1);
|
|
if (turnPage6.strQueryResult == false) {
|
|
turnPage6.queryModal(tSQLInfo3.getString(), TooContectGrid, 1, 1);
|
|
if (turnPage6.strQueryResult == false) {
|
|
document.all("TooContect").checked = false;
|
|
divLinkPeopleInfo.style.display = 'none';
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
} else {
|
|
document.all("TooContect").checked = true;
|
|
divLinkPeopleInfo.style.display = '';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//mNewDetailInfo=表 mOldDetailInfo=C表
|
|
function AppntDetailInfo(mNewDetailInfo,mOldDetailInfo) {
|
|
|
|
var detailInfo ;
|
|
if (mNewDetailInfo === null){
|
|
detailInfo = mOldDetailInfo
|
|
}else{
|
|
detailInfo = mNewDetailInfo ;
|
|
}
|
|
|
|
if(detailInfo != null){
|
|
//更新后的投保人信息
|
|
document.all("AppntNo").value = detailInfo[0][0];//投保人编码
|
|
document.all("GrpName").value = detailInfo[0][1];//投保人名称
|
|
// document.all("SumNumPeople").value = detailInfo[0][2];//员工总数
|
|
document.all("MainBusiness").value = detailInfo[0][3];//经营范围
|
|
document.all("GrpNature").value = detailInfo[0][4];//单位性质
|
|
document.all("BusiCategory").value = detailInfo[0][5];//行业分类
|
|
// document.all("SocialInsuCode").value = detailInfo[0][6];//社会保险登记证号
|
|
document.all("Phone1").value = detailInfo[0][7];//单位联系电话
|
|
// document.all("Fax").value = detailInfo[0][8];//单位传真
|
|
document.all("Corporation").value = detailInfo[0][9];//法人
|
|
document.all("CorIDType").value = detailInfo[0][10];//法人证件类型
|
|
document.all("CorID").value = detailInfo[0][11];//法人证件号码
|
|
document.all("CorIDExpiryDate").value = detailInfo[0][12];//法人证件有效止期
|
|
document.all("InstitutionsCategory").value = detailInfo[0][13];//机构类别
|
|
document.all("TaxrStatus").value = detailInfo[0][14];//机构税收居民身份
|
|
document.all("ControlTaxRT").value = detailInfo[0][15];//控制人税收居民类型
|
|
|
|
// document.all("AllOnWorkPeoples").value = detailInfo[0][16];//在职人数
|
|
// document.all("AllOffWorkPeoples").value = detailInfo[0][17];//退休人数
|
|
// document.all("MainInsuPeoples").value = detailInfo[0][18];//主被保险人数
|
|
// document.all("RelaInsuPeoples").value = detailInfo[0][19];//附属被保险人数
|
|
// document.all("SumInsuPeoples").value = detailInfo[0][20];//合计
|
|
document.all("CorIDStartDate").value = detailInfo[0][21];//法人证件有效起期
|
|
document.all("AuthorizerFlag").value = detailInfo[0][22];//保险经办人为唯一合法授权人
|
|
document.all("AuthorizerFlagName").value = detailInfo[0][23];//保险经办人为唯一合法授权人name
|
|
// document.all("ProvincialMngFlag").value = detailInfo[0][24];//是否省管产业单位
|
|
// document.all("ProvincialMngFlagName").value = detailInfo[0][25];//是否省管产业单位name
|
|
// document.all("GreenSign").value = detailInfo[0][26];//是否为绿色标识
|
|
// document.all("GreenSignName").value = detailInfo[0][27];//是否为绿色标识name
|
|
// document.all("EnterpriseFlag").value = detailInfo[0][28];//中小微企业标识
|
|
// document.all("EnterpriseFlagName").value = detailInfo[0][29];//中小微企业标识name
|
|
// document.all("NewEnergyFlag").value = detailInfo[0][30];//能源行业人身保险业务标识
|
|
// document.all("NewEnergyFlagName").value = detailInfo[0][31];//能源行业人身保险业务标识name
|
|
// document.all("ElectricalBusi").value = detailInfo[0][32];//是否农电工业务
|
|
// document.all("ElectricalBusiName").value = detailInfo[0][33];//是否农电工业务name
|
|
document.all("DisputedFlag").value = detailInfo[0][34];//合同争议处理方式
|
|
document.all("DisputedFlagName").value = detailInfo[0][35];//合同争议处理方式name
|
|
document.all("ArbitrationCom").value = detailInfo[0][36];//仲裁委员会名称
|
|
|
|
// document.all("IncomeAmnt").value = detailInfo[0][37];//营业收入
|
|
// document.all("TotalAssets").value = detailInfo[0][38];//资产总额
|
|
// document.all("SCFInsuranceFlag").value = detailInfo[0][39];//供应链金融业务-保险产品(短险)标识
|
|
// document.all("SCFInsuranceFlagName").value = detailInfo[0][40];//供应链金融业务-保险产品(短险)标识name
|
|
// document.all("ProductChainFlag").value = detailInfo[0][41];//产业链上下游企业标识
|
|
// document.all("ProductChainFlagName").value = detailInfo[0][42];//产业链上下游企业标识name
|
|
// document.all("PowerGridFlag").value = detailInfo[0][43];//电网主业人身保险业务标识
|
|
// document.all("PowerGridFlagName").value = detailInfo[0][44];//电网主业人身保险业务标识name
|
|
|
|
showOneCodeName('institutionscategory', 'InstitutionsCategory', 'InstitutionsCategoryName');
|
|
showOneCodeName('taxresidentstatus', 'TaxrStatus', 'TaxrStatusName');
|
|
showOneCodeName('controltaxresidentstype', 'ControlTaxRT', 'ControlTaxRTName');
|
|
showOneCodeName('trueflag', 'AuthorizerFlag', 'AuthorizerFlagName');
|
|
|
|
showOneCodeName('grpnature', 'GrpNature', 'GrpNatureName');
|
|
showOneCodeName('category', 'BusiCategory', 'BusiCategoryName');
|
|
showOneCodeName('idtype', 'CorIDType', 'CorIDTypeName');
|
|
}
|
|
|
|
if(mOldDetailInfo != null){
|
|
document.all("OldAppntNo").value = mOldDetailInfo[0][0];//投保人编码
|
|
document.all("OldGrpName").value = mOldDetailInfo[0][1];//投保人名称
|
|
// document.all("OldSumNumPeople").value = mOldDetailInfo[0][2];//员工总数
|
|
document.all("OldMainBusiness").value = mOldDetailInfo[0][3];//经营范围
|
|
document.all("OldGrpNature").value = mOldDetailInfo[0][4];//单位性质
|
|
document.all("OldBusiCategory").value = mOldDetailInfo[0][5];//行业分类
|
|
// document.all("OldSocialInsuCode").value = mOldDetailInfo[0][6];//社会保险登记证号
|
|
document.all("OldPhone1").value = mOldDetailInfo[0][7];//单位联系电话
|
|
// document.all("OldFax").value = mOldDetailInfo[0][8];//单位传真
|
|
document.all("OldCorporation").value = mOldDetailInfo[0][9];//法人
|
|
document.all("OldCorIDType").value = mOldDetailInfo[0][10];//法人证件类型
|
|
document.all("OldCorID").value = mOldDetailInfo[0][11];//法人证件号码
|
|
document.all("OldCorIDExpiryDate").value = mOldDetailInfo[0][12];//法人证件有效止期
|
|
document.all("OldInstitutionsCategory").value = mOldDetailInfo[0][13];//机构类别
|
|
document.all("OldTaxrStatus").value = mOldDetailInfo[0][14];//机构税收居民身份
|
|
document.all("OldControlTaxRT").value = mOldDetailInfo[0][15];//控制人税收居民类型
|
|
|
|
// document.all("OldAllOnWorkPeoples").value = mOldDetailInfo[0][16];//在职人数
|
|
// document.all("OldAllOffWorkPeoples").value = mOldDetailInfo[0][17];//退休人数
|
|
// document.all("OldMainInsuPeoples").value = mOldDetailInfo[0][18];//主被保险人数
|
|
// document.all("OldRelaInsuPeoples").value = mOldDetailInfo[0][19];//附属被保险人数
|
|
// document.all("OldSumInsuPeoples").value = mOldDetailInfo[0][20];//合计
|
|
document.all("OldCorIDStartDate").value = mOldDetailInfo[0][21];//法人证件有效起期
|
|
document.all("OldAuthorizerFlag").value = mOldDetailInfo[0][22];//保险经办人为唯一合法授权人
|
|
document.all("OldAuthorizerFlagName").value = mOldDetailInfo[0][23];//保险经办人为唯一合法授权人name
|
|
// document.all("OldProvincialMngFlag").value = mOldDetailInfo[0][24];//是否省管产业单位
|
|
// document.all("OldProvincialMngFlagName").value = mOldDetailInfo[0][25];//是否省管产业单位name
|
|
// document.all("OldGreenSign").value = mOldDetailInfo[0][26];//是否为绿色标识
|
|
// document.all("OldGreenSignName").value = mOldDetailInfo[0][27];//是否为绿色标识name
|
|
// document.all("OldEnterpriseFlag").value = mOldDetailInfo[0][28];//中小微企业标识
|
|
// document.all("OldEnterpriseFlagName").value = mOldDetailInfo[0][29];//中小微企业标识name
|
|
// document.all("OldNewEnergyFlag").value = mOldDetailInfo[0][30];//能源行业人身保险业务标识
|
|
// document.all("OldNewEnergyFlagName").value = mOldDetailInfo[0][31];//能源行业人身保险业务标识name
|
|
// document.all("OldElectricalBusi").value = mOldDetailInfo[0][32];//是否农电工业务
|
|
// document.all("OldElectricalBusiName").value = mOldDetailInfo[0][33];//是否农电工业务name
|
|
document.all("OldDisputedFlag").value = mOldDetailInfo[0][34];//合同争议处理方式
|
|
document.all("OldDisputedFlagName").value = mOldDetailInfo[0][35];//合同争议处理方式name
|
|
document.all("OldArbitrationCom").value = mOldDetailInfo[0][36];//仲裁委员会名称
|
|
|
|
// document.all("OldIncomeAmnt").value = mOldDetailInfo[0][37];//营业收入
|
|
// document.all("OldTotalAssets").value = mOldDetailInfo[0][38];//资产总额
|
|
// document.all("OldSCFInsuranceFlag").value = mOldDetailInfo[0][39];//供应链金融业务-保险产品(短险)标识
|
|
// document.all("OldSCFInsuranceFlagName").value = mOldDetailInfo[0][40];//供应链金融业务-保险产品(短险)标识name
|
|
// document.all("OldProductChainFlag").value = mOldDetailInfo[0][41];//产业链上下游企业标识
|
|
// document.all("OldProductChainFlagName").value = mOldDetailInfo[0][42];//产业链上下游企业标识name
|
|
// document.all("OldPowerGridFlag").value = mOldDetailInfo[0][43];//电网主业人身保险业务标识
|
|
// document.all("OldPowerGridFlagName").value = mOldDetailInfo[0][44];//电网主业人身保险业务标识name
|
|
|
|
showOneCodeName('institutionscategory', 'OldInstitutionsCategory', 'OldInstitutionsCategoryName');
|
|
showOneCodeName('taxresidentstatus', 'OldTaxrStatus', 'OldTaxrStatusName');
|
|
showOneCodeName('controltaxresidentstype', 'OldControlTaxRT', 'OldControlTaxRTName');
|
|
showOneCodeName('trueflag', 'OldAuthorizerFlag', 'OldAuthorizerFlagName');
|
|
|
|
showOneCodeName('grpnature', 'OldGrpNature', 'OldGrpNatureName');
|
|
showOneCodeName('category', 'OldBusiCategory', 'OldBusiCategoryName');
|
|
showOneCodeName('idtype', 'OldCorIDType', 'OldCorIDTypeName');
|
|
}
|
|
|
|
}
|
|
|
|
function AppntAddressInfo(tNewAddressInfo, tOldAddressInfo) {
|
|
var addressInfo;
|
|
if (tNewAddressInfo == null) {
|
|
addressInfo = tOldAddressInfo
|
|
} else {
|
|
addressInfo = tNewAddressInfo;
|
|
}
|
|
|
|
if (addressInfo != null) {
|
|
document.all("ProvinceCode").value = addressInfo[0][1];
|
|
document.all("ProvinceName").value = addressInfo[0][2];
|
|
document.all("CityCode").value = addressInfo[0][3];
|
|
document.all("CityName").value = addressInfo[0][4];
|
|
document.all("CountyCode").value = addressInfo[0][5];
|
|
document.all("CountyName").value = addressInfo[0][6];
|
|
document.all("DetailAddress").value = addressInfo[0][7];
|
|
document.all("ZipCode").value = addressInfo[0][8];
|
|
}
|
|
if (tOldAddressInfo != null) {
|
|
document.all("OldProvinceCode").value = tOldAddressInfo[0][1];
|
|
document.all("OldProvinceName").value = tOldAddressInfo[0][2];
|
|
document.all("OldCityCode").value = tOldAddressInfo[0][3];
|
|
document.all("OldCityName").value = tOldAddressInfo[0][4];
|
|
document.all("OldCountyCode").value = tOldAddressInfo[0][5];
|
|
document.all("OldCountyName").value = tOldAddressInfo[0][6];
|
|
document.all("OldDetailAddress").value = tOldAddressInfo[0][7];
|
|
document.all("OldZipCode").value = tOldAddressInfo[0][8];
|
|
}
|
|
}
|
|
|
|
function GrpIDInfo(tNewGrpIDInfo, tOLdGrpIDInfo) {
|
|
var grpIDInfo;
|
|
if (tNewGrpIDInfo == null) {
|
|
grpIDInfo = tOLdGrpIDInfo
|
|
} else {
|
|
grpIDInfo = tNewGrpIDInfo;
|
|
}
|
|
|
|
if (grpIDInfo != null) {
|
|
document.all("GrpIDType").value = grpIDInfo[0][0]; //单位证件类型
|
|
document.all("GrpIDTypeName").value = grpIDInfo[0][1]; //
|
|
document.all("GrpID").value = grpIDInfo[0][2]; //单位证件号码
|
|
document.all("GrpIDStartDate").value = grpIDInfo[0][3]; //单位证件有效起期
|
|
document.all("GrpIDExpiryDate").value = grpIDInfo[0][4]; //单位证件有效止期
|
|
}
|
|
|
|
if (tOLdGrpIDInfo != null) {
|
|
document.all("OldGrpIDType").value = tOLdGrpIDInfo[0][0]; //单位证件类型
|
|
document.all("OldGrpIDTypeName").value = tOLdGrpIDInfo[0][1]; //
|
|
document.all("OldGrpID").value = tOLdGrpIDInfo[0][2]; //单位证件号码
|
|
document.all("OldGrpIDStartDate").value = tOLdGrpIDInfo[0][3]; //单位证件有效起期
|
|
document.all("OldGrpIDExpiryDate").value = tOLdGrpIDInfo[0][4]; //单位证件有效止期
|
|
}
|
|
}
|
|
|
|
function LinkInfo(tNewLinkinfo, tOldLinkinfo) {
|
|
var linkinfo;
|
|
|
|
if (tNewLinkinfo == null) {
|
|
linkinfo = tOldLinkinfo
|
|
} else {
|
|
linkinfo = tNewLinkinfo;
|
|
}
|
|
if (linkinfo != null) {
|
|
document.all("LinkMan").value = linkinfo[0][0]; //联系人姓名
|
|
document.all("Phone2").value = linkinfo[0][1];//联系人电话
|
|
document.all("EMail").value = linkinfo[0][2];//联系人E-MAIL
|
|
document.all("MobilePhone").value = linkinfo[0][3];//联系人手机号
|
|
document.all("Department").value = linkinfo[0][4];//联系人部门
|
|
document.all("IDType").value = linkinfo[0][5];//联系人证件类型
|
|
document.all("IDTypeName").value = linkinfo[0][6];//
|
|
document.all("IDNo").value = linkinfo[0][7];//联系人证件号码
|
|
document.all("IDEndDate").value = linkinfo[0][8];//联系人证件有效止期
|
|
document.all("IDStartDate").value = linkinfo[0][9];//联系人证件有效起期
|
|
}
|
|
|
|
if (tOldLinkinfo != null) {
|
|
document.all("OldLinkMan").value = tOldLinkinfo[0][0]; //联系人姓名
|
|
document.all("OldPhone2").value = tOldLinkinfo[0][1];//联系人电话
|
|
document.all("OldEMail").value = tOldLinkinfo[0][2];//联系人E-MAIL
|
|
document.all("OldMobilePhone").value = tOldLinkinfo[0][3];//联系人手机号
|
|
document.all("OldDepartment").value = tOldLinkinfo[0][4];//联系人部门
|
|
document.all("OldIDType").value = tOldLinkinfo[0][5];//联系人证件类型
|
|
document.all("OldIDTypeName").value = tOldLinkinfo[0][6];//
|
|
document.all("OldIDNo").value = tOldLinkinfo[0][7];//联系人证件号码
|
|
document.all("OldIDEndDate").value = tOldLinkinfo[0][8];//联系人证件有效止期
|
|
document.all("OldIDStartDate").value = tOldLinkinfo[0][9];//联系人证件有效起期
|
|
}
|
|
}
|
|
|
|
function checkIDDate(startDate, enddate, flag) {
|
|
var conent = null;
|
|
if (flag == 1) {
|
|
conent == "法人/负责人"
|
|
} else if (flag == 2) {
|
|
conent = "经办人"
|
|
} else if (flag == 3) {
|
|
conent = "联系人"
|
|
}
|
|
|
|
// 将输入转换为 Date 对象
|
|
const ExpiryDate = new Date(enddate);
|
|
const StartDate = new Date(startDate);
|
|
// 计算初步的年份差
|
|
let yearDiff = ExpiryDate.getFullYear() - StartDate.getFullYear();
|
|
|
|
// if (flag = "4") {
|
|
// if (yearDiff < 0) {
|
|
// return false;
|
|
// }
|
|
// return true;
|
|
// }
|
|
|
|
|
|
if (yearDiff < 5) {
|
|
i18nAlert(conent + "年龄范围为小于16周岁时, 止期年 - 起期年 = 5\n" +
|
|
conent + "年龄范围为大于16周岁小于25周岁时, 止期年 - 起期年 = 10\n" +
|
|
conent + "年龄范围为大于25周岁小于45周岁时, 止期年 - 起期年 = 20", null);
|
|
return false;
|
|
} else if (yearDiff < 10) {
|
|
i18nAlert(conent + "年龄范围为小于16周岁时, 止期年 - 起期年 = 5\n" +
|
|
conent + "年龄范围为大于16周岁小于25周岁时, 止期年 - 起期年 = 10\n" +
|
|
conent + "年龄范围为大于25周岁小于45周岁时, 止期年 - 起期年 = 20", null);
|
|
return false;
|
|
} else if (yearDiff < 20) {
|
|
i18nAlert(conent + "年龄范围为小于16周岁时, 止期年 - 起期年 = 5\n" +
|
|
conent + "年龄范围为大于16周岁小于25周岁时, 止期年 - 起期年 = 10\n" +
|
|
conent + "年龄范围为大于25周岁小于45周岁时, 止期年 - 起期年 = 20", null);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
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)) {
|
|
i18nAlert("税务登记证及纳税人识别号不符合规则,应由字母数字组成,位数为18位!", "");
|
|
return false;
|
|
}
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql53");
|
|
tSQLInfo.addSubPara(IDno);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry==null) {
|
|
i18nAlert("税务登记证及纳税人识别号前两位应以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_pos.EdorACSql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorACSql53");
|
|
tSQLInfo.addSubPara(fm.TaxNo.value);
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry==null) {
|
|
i18nAlert("税务登记证及纳税人识别号前两位应以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;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function returnbak() {
|
|
top.opener.initForm();
|
|
top.close();
|
|
}
|
|
|
|
|
|
function initEdorAcceptNoAndEdorNo() {
|
|
if (tActivityID == '1800401002' || tActivityID == '1800401003') {
|
|
|
|
} else {
|
|
// tEdorAcceptNo = "";
|
|
// tEdorNo = "";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 严格校验身份证号码
|
|
* 兰军 2005-7-2 17:05
|
|
* 公民身份号码是特征组合码,
|
|
* 由十七位数字本体码和一位数字校验码组成。
|
|
* 排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,
|
|
* 三位数字顺序码和一位数字校验码。顺序码的奇数分给男性,偶数分给女性。
|
|
* 校验码是根据前面十七位数字码,按照ISO7064:1983.MOD11-2校验码计算出来的检验码。
|
|
*/
|
|
function checkIdNO(idCard) {
|
|
var con;
|
|
var SystemDate = new Date();
|
|
var year = SystemDate.getFullYear();
|
|
var month = SystemDate.getMonth() + 1;
|
|
var day = SystemDate.getDate();
|
|
var yyyy; //年
|
|
var mm; //月
|
|
var dd; //日
|
|
var birthday; //生日
|
|
var sex; //性别
|
|
var id = idCard;
|
|
var id_length = id.length;
|
|
if (id_length == 0) {
|
|
con = "请输入身份证号码!";
|
|
return con;
|
|
return con;
|
|
}
|
|
if (id_length != 18) {
|
|
con = "身份证号长度应为15位或18位!";
|
|
return con;
|
|
}
|
|
if (id_length == 18) {
|
|
for (var i = 0; i < id_length - 1; i++) {
|
|
if (isNaN(idCard.charAt(i))) {
|
|
con = "身份证号中前17位中不能有字符!";
|
|
return con;
|
|
}
|
|
}
|
|
if (isNaN(idCard.charAt(17)) && idCard.charAt(17) != "X" && idCard.charAt(17) != "x") {
|
|
con = "身份证校验错误,请认真检查!";
|
|
return con;
|
|
}
|
|
if (idCard.indexOf("X") > 0 && idCard.indexOf("X") != 17 || idCard.indexOf("x") > 0 && idCard.indexOf("x") != 17) {
|
|
con = "身份证中\"X\"输入位置不正确!";
|
|
return con;
|
|
}
|
|
yyyy = id.substring(6, 10);
|
|
if (yyyy > year || yyyy < 1900) {
|
|
con = "身份证号年度非法!";
|
|
return con;
|
|
}
|
|
mm = id.substring(10, 12);
|
|
if (mm > 12 || mm <= 0) {
|
|
con = "身份证号月份非法!";
|
|
return con;
|
|
}
|
|
if (yyyy == year && mm > month) {
|
|
con = "身份证号月份非法!";
|
|
return con;
|
|
}
|
|
dd = id.substring(12, 14);
|
|
if (dd > 31 || dd <= 0) {
|
|
con = "身份证号日期非法!";
|
|
return con;
|
|
}
|
|
//4,6,9,11月份日期不能超过30
|
|
if ((mm == 4 || mm == 6 || mm == 9 || mm == 11) && (dd > 30)) {
|
|
con = "身份证号日期非法!";
|
|
return con;
|
|
}
|
|
//判断2月份
|
|
if (mm == 2) {
|
|
if (LeapYear(yyyy)) {
|
|
if (dd > 29) {
|
|
con = "身份证号日期非法!";
|
|
return con;
|
|
|
|
}
|
|
} else {
|
|
if (dd > 28) {
|
|
con = "身份证号日期非法!";
|
|
return con;
|
|
}
|
|
}
|
|
}
|
|
if (yyyy == year && mm == month && dd > day) {
|
|
con = "身份证号日期非法!";
|
|
return con;
|
|
}
|
|
if (id.charAt(17) == "x" || id.charAt(17) == "X") {
|
|
if ("x" != GetVerifyBit(id) && "X" != GetVerifyBit(id)) {
|
|
con = "身份证校验错误,请认真检查!";
|
|
return con;
|
|
}
|
|
} else {
|
|
if (id.charAt(17) != GetVerifyBit(id)) {
|
|
con = "身份证校验错误,请认真检查!";
|
|
return con;
|
|
}
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
|