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.
1201 lines
57 KiB
1201 lines
57 KiB
// 该文件中包含客户端需要处理的函数和事件
|
|
var showInfo;
|
|
var arrResult;
|
|
var mDebug = "0";
|
|
var mOperate = "";
|
|
var turnPage = new turnPageClass();
|
|
var mWFlag = 0;
|
|
turnPage.pageLineNum = 200;
|
|
var turnPage1 = new turnPageClass();
|
|
|
|
|
|
/*********************************************************************
|
|
* 点击返回按钮,关闭当前页面
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function goback() {
|
|
top.close();
|
|
}
|
|
|
|
|
|
/*********************************************************************
|
|
* 保存个人投保单的提交后的操作,服务器数据返回后执行的操作
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
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; //获得窗口的水平位置
|
|
var 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; //获得窗口的水平位置
|
|
var 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 saveFBInfo() {
|
|
FBRuleRiskGrid.delBlankLine("FBRuleRiskGrid");
|
|
FBRuleContGrid.delBlankLine("FBRuleContGrid");
|
|
// if((FBRuleRiskGrid.mulLineCount == 0) && (FBRuleContGrid.mulLineCount == 0)){
|
|
// alert("请增加分保规则明细之后在保存!");
|
|
// return;
|
|
// }
|
|
|
|
fm.action = "../API/grp_quotation/g_quot/FBRuleDetailSave/UPDATE?Operate=UPDATE";
|
|
submitForm(fm, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function submitForm(obj, dynamic) {
|
|
|
|
var showStr = i18nMessage("正在处理数据,请您稍候并且不要修改屏幕上的值或链接其他页面!", "LIS-04535");
|
|
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");
|
|
//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; //获得窗口的水平位置
|
|
var 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();
|
|
/*obj.submit();*/
|
|
if (dynamic != null && dynamic === true) {
|
|
ajaxSubmit(obj);
|
|
} else {
|
|
ajaxSubmit2(obj);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*********************************************************************
|
|
* 显示frmSubmit框架,用来调试
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function showSubmitFrame(cDebug) {
|
|
if (cDebug == "1")
|
|
parent.fraMain.rows = "0,0,50,82,*";
|
|
else
|
|
parent.fraMain.rows = "0,0,0,72,*";
|
|
}
|
|
|
|
/*********************************************************************
|
|
* Click事件,当点击增加图片时触发该函数
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function addClick() {
|
|
if (fm.FBType.value == null || fm.FBType.value == "") {
|
|
alert("请录入【分保类型】");
|
|
return;
|
|
}
|
|
if(fm.InputMode.value =="1"){
|
|
if ((fm.RiskCode.value == null || fm.RiskCode.value == "")) {
|
|
alert("请录入【险种代码】");
|
|
return;
|
|
}
|
|
}else if (fm.InputMode.value=="2"){
|
|
if(fm.ContPlanCode2.value==""|| fm.ContPlanCode2.value == ""){
|
|
alert("请录入保障层级");
|
|
return false;
|
|
}
|
|
}
|
|
if (fm.Remark.value !="" && fm.Remark.value !=null){
|
|
if (fm.Remark.value.length > 100) {
|
|
alert("备注不超过100个字")
|
|
return false;
|
|
}
|
|
}
|
|
//临分需求 add by cj
|
|
if (fm.FBStyle.value == null || fm.FBStyle.value == "" || fm.FBStyle1.value == null || fm.FBStyle1.value == "") {
|
|
alert("请录入【临分方式】");
|
|
return;
|
|
}
|
|
if (fm.FBStyle1.value == "2") {
|
|
|
|
if (fm.FBSelfNum.value == null || fm.FBSelfNum.value == "") {
|
|
alert("请录入【临分自留比例】");
|
|
return;
|
|
}
|
|
if (fm.ZBCommisionRate.value == null || fm.ZBCommisionRate.value == "") {
|
|
alert("请录入【再保佣金率】");
|
|
return;
|
|
}
|
|
if (fm.FBSelfNum.value > 1 || fm.FBSelfNum.value < 0) {
|
|
alert("临分自留比例只能录入0~1小数");
|
|
return;
|
|
}
|
|
|
|
if (fm.ZBCommisionRate.value > 1 || fm.ZBCommisionRate.value < 0) {
|
|
alert("再保佣金率只能录入0~1小数");
|
|
return;
|
|
}
|
|
if(!validateNumberFormat(fm.FBSelfNum.value,1,2)){
|
|
alert("临分自留比例只能保留两位小数");
|
|
return false;
|
|
}
|
|
if(!validateNumberFormat(fm.ZBCommisionRate.value,1,150)){
|
|
alert("再保佣金率只能保留150位小数");
|
|
return false;
|
|
}
|
|
}
|
|
if (fm.FBStyle1.value == "1") {
|
|
|
|
if (fm.FBSelfNum.value == null || fm.FBSelfNum.value == "") {
|
|
alert("请录入【临分自留额】");
|
|
return;
|
|
}
|
|
if(!validateNumberFormat(fm.FBSelfNum.value,12,2)){
|
|
alert("临分自留额只能保留十二位整数,两位小数");
|
|
return false;
|
|
}
|
|
if ( fm.FBSelfNum.value < 0) {
|
|
alert("临分自留额只能是正数");
|
|
return;
|
|
}
|
|
if(fm.InputMode.value =="2"){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql10");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(fm.ContPlanCode2.value);
|
|
|
|
var tSFlagarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tSFlagarrResult != null) {
|
|
if(compareValues(fm.FBSelfNum.value , tSFlagarrResult[0][0],">")) {
|
|
alert("按方案时临分自留额不能超过方案保额"+tSFlagarrResult[0][0]+"元");
|
|
return false;
|
|
}
|
|
}
|
|
}else if (fm.InputMode.value=="1"){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql11");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(fm.RiskCode.value);
|
|
|
|
var tSFlagarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tSFlagarrResult != null) {
|
|
if(compareValues(fm.FBSelfNum.value , tSFlagarrResult[0][0],">")) {
|
|
alert("按险种时临分自留额不能超过险种保额"+tSFlagarrResult[0][0]+"元");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var tCount = FBCont2Grid.mulLineCount;
|
|
for (var i=0; i<tCount;i++){
|
|
if (fm.FBStyle.value == "2"){
|
|
if (FBCont2Grid.getRowColData(i, 8) == null || FBCont2Grid.getRowColData(i, 8) == '') {
|
|
alert("临分费率不能为空");
|
|
return false;
|
|
}
|
|
if(!validateNumberFormat(FBCont2Grid.getRowColData(i,8),12,4)){
|
|
alert("临分费率只能保留十二位整数,四位小数");
|
|
return false;
|
|
}
|
|
if ( FBCont2Grid.getRowColData(i,8) < 0) {
|
|
alert("临分费率只能是正数");
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if (fm.FBStyle.value == "1" && fm.FBStyle1.value == "2") {
|
|
|
|
} else {
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql4");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
|
|
var tSFlagarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tSFlagarrResult != null) {
|
|
if (fm.RateCalType.value == null || fm.RateCalType.value == "") {
|
|
alert("请录入【费率计量方式】");
|
|
return;
|
|
}
|
|
if (fm.RateCalUnit.value == null || fm.RateCalUnit.value == "") {
|
|
alert("请录入【费率计量单位】");
|
|
return;
|
|
}
|
|
} else {
|
|
|
|
if (fm.RateCalTime.value == null || fm.RateCalTime.value == "") {
|
|
alert("请录入【费率计量时间】");
|
|
return;
|
|
}
|
|
if (fm.RateCalUnit.value == null || fm.RateCalUnit.value == "") {
|
|
alert("请录入【费率计量单位】");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (fm.FBCompany.value == null || fm.FBCompany.value == "") {
|
|
alert("请录入【再保公司】");
|
|
return;
|
|
}
|
|
// var askPtrNoSql1 = " select 1 from askprt where askno='" + fm.AskNo.value + "' ";
|
|
// var arrResult1 = easyExecSql(askPtrNoSql1);
|
|
// if (arrResult1 != null && arrResult1.length > 0) {
|
|
// alert("该询价已生成投保单,是否继续修改?");
|
|
// }
|
|
//FBRuleGrid.delBlankLine;
|
|
//默认没有添加过
|
|
|
|
if (fm.InputMode.value == "1") {
|
|
var tCount = FBFamily2Grid.mulLineCount;
|
|
if (tCount > 0) {
|
|
for (var i = 0; i < tCount; i++) {
|
|
var FBFamilyRate = FBFamily2Grid.getRowColData(i, 5);
|
|
if (FBFamilyRate != null && FBFamilyRate != "") {
|
|
if (FBFamilyRate > 1 || FBFamilyRate < 0) {
|
|
alert("再保份额只能录入0~1小数");
|
|
return;
|
|
}
|
|
if(!validateNumberFormat(FBFamily2Grid.getRowColData(i,5),1,2)){
|
|
alert("再保份额只能保留两位小数");
|
|
return false;
|
|
}
|
|
} else {
|
|
alert("再保份额不能为空");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
var lineCount = FBRuleRiskGrid.mulLineCount;
|
|
if (lineCount > 0) {
|
|
var num = 0;
|
|
for (var i = 0; i < lineCount; i++) {
|
|
if (FBRuleRiskGrid.getRowColData(i, 3).trim() == fm.RiskCode.value.trim()) {
|
|
num++;
|
|
}
|
|
}
|
|
if (num > 0) {
|
|
if (!confirm("险种【" + fm.RiskCodeName.value + "】已经录入分保信息您确认要修改吗?")) {
|
|
return false;
|
|
}
|
|
}
|
|
var FBCont2line = FBCont2Grid.mulLineCount;//保障层级列表数
|
|
var FBFamily2line = FBFamily2Grid.mulLineCount;//再保公司列表数
|
|
var a = lineCount;
|
|
for (var i = 0; i < FBFamily2line; i++) {
|
|
//update by yx
|
|
for (var j = 0; j < FBCont2line; j++) {
|
|
var flag = false;
|
|
for (var k = 0; k < lineCount; k++) {
|
|
if ((FBRuleRiskGrid.getRowColData(k, 3).trim() == fm.RiskCode.value.trim()) && (FBRuleRiskGrid.getRowColData(k, 6) == FBCont2Grid.getRowColData(j, 2)) && (FBRuleRiskGrid.getRowColData(k, 7) == FBCont2Grid.getRowColData(j, 5)) && (FBRuleRiskGrid.getRowColData(k, 14) == FBFamily2Grid.getRowColData(i, 4))) {
|
|
FBRuleRiskGrid.setRowColData(k, 1, fm.FBType.value);
|
|
if (FBRuleRiskGrid.getRowColData(k,1)=='5'){
|
|
|
|
FBRuleRiskGrid.setRowColData(k, 2, fm.OtherFBType.value);
|
|
}else{
|
|
FBRuleRiskGrid.setRowColData(k, 2, fm.FBTypeName.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(k, 3, fm.RiskCode.value);
|
|
FBRuleRiskGrid.setRowColData(k, 4, fm.RiskCodeName.value);
|
|
FBRuleRiskGrid.setRowColData(k, 9, fm.FBStyle.value);
|
|
FBRuleRiskGrid.setRowColData(k, 10, fm.FBStylename.value);
|
|
FBRuleRiskGrid.setRowColData(k, 11, fm.FBStyle1.value);
|
|
FBRuleRiskGrid.setRowColData(k, 12, fm.FBStyle1name.value);
|
|
FBRuleRiskGrid.setRowColData(k, 16, fm.FBSelfNum.value);
|
|
FBRuleRiskGrid.setRowColData(k, 17, fm.ZBCommisionRate.value);
|
|
FBRuleRiskGrid.setRowColData(k, 19, fm.RateCalType.value);
|
|
FBRuleRiskGrid.setRowColData(k, 20, fm.RateCalTypeName.value);
|
|
FBRuleRiskGrid.setRowColData(k, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(k, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(k, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(k, 23, fm.RateCalUnit.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(k, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(k, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(k, 25, fm.Remark.value);
|
|
FBRuleRiskGrid.setRowColData(k, 26, FBCont2Grid.getRowColData(j, 9));//方案编码
|
|
FBRuleRiskGrid.setRowColData(k, 5, FBCont2Grid.getRowColData(j, 9));//方案编码
|
|
FBRuleRiskGrid.setRowColData(k, 6, FBCont2Grid.getRowColData(j, 2));//方案描述
|
|
FBRuleRiskGrid.setRowColData(k, 7, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleRiskGrid.setRowColData(k, 8, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleRiskGrid.setRowColData(k, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleRiskGrid.setRowColData(k, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleRiskGrid.setRowColData(k, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleRiskGrid.setRowColData(k, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
flag = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!flag) {
|
|
FBRuleRiskGrid.addOne();
|
|
FBRuleRiskGrid.setRowColData(a, 1, fm.FBType.value);
|
|
FBRuleRiskGrid.setRowColData(a, 2, fm.FBTypeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 3, fm.RiskCode.value);
|
|
FBRuleRiskGrid.setRowColData(a, 4, fm.RiskCodeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 6, FBCont2Grid.getRowColData(j, 2));
|
|
FBRuleRiskGrid.setRowColData(a, 7, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleRiskGrid.setRowColData(a, 8, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleRiskGrid.setRowColData(a, 9, fm.FBStyle.value);
|
|
FBRuleRiskGrid.setRowColData(a, 10, fm.FBStylename.value);
|
|
FBRuleRiskGrid.setRowColData(a, 11, fm.FBStyle1.value);
|
|
FBRuleRiskGrid.setRowColData(a, 12, fm.FBStyle1name.value);
|
|
FBRuleRiskGrid.setRowColData(a, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleRiskGrid.setRowColData(a, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleRiskGrid.setRowColData(a, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
FBRuleRiskGrid.setRowColData(a, 16, fm.FBSelfNum.value);
|
|
FBRuleRiskGrid.setRowColData(a, 17, fm.ZBCommisionRate.value);
|
|
FBRuleRiskGrid.setRowColData(a, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleRiskGrid.setRowColData(a, 19, fm.RateCalType.value);
|
|
FBRuleRiskGrid.setRowColData(a, 20, fm.RateCalTypeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(a, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(a, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(a, 23, fm.RateCalUnit.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(a, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(a, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(a, 25, fm.Remark.value);
|
|
FBRuleRiskGrid.setRowColData(a, 26, FBCont2Grid.getRowColData(j, 9));//方案编码
|
|
FBRuleRiskGrid.setRowColData(a, 5, FBCont2Grid.getRowColData(j, 9));//方案编码
|
|
a = a + 1;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
var FBCont2line = FBCont2Grid.mulLineCount;//保障层级列表数
|
|
var FBFamily2line = FBFamily2Grid.mulLineCount;//再保公司列表数
|
|
var a = lineCount;
|
|
for (var i = 0; i < FBFamily2line; i++) {
|
|
for (var j = 0; j < FBCont2line; j++) {
|
|
FBRuleRiskGrid.addOne();
|
|
FBRuleRiskGrid.setRowColData(a, 1, fm.FBType.value);
|
|
FBRuleRiskGrid.setRowColData(a, 2, fm.FBTypeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 3, fm.RiskCode.value);
|
|
FBRuleRiskGrid.setRowColData(a, 4, fm.RiskCodeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 6, FBCont2Grid.getRowColData(j, 2));
|
|
FBRuleRiskGrid.setRowColData(a, 7, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleRiskGrid.setRowColData(a, 8, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleRiskGrid.setRowColData(a, 9, fm.FBStyle.value);
|
|
FBRuleRiskGrid.setRowColData(a, 10, fm.FBStylename.value);
|
|
FBRuleRiskGrid.setRowColData(a, 11, fm.FBStyle1.value);
|
|
FBRuleRiskGrid.setRowColData(a, 12, fm.FBStyle1name.value);
|
|
FBRuleRiskGrid.setRowColData(a, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleRiskGrid.setRowColData(a, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleRiskGrid.setRowColData(a, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
FBRuleRiskGrid.setRowColData(a, 16, fm.FBSelfNum.value);
|
|
FBRuleRiskGrid.setRowColData(a, 17, fm.ZBCommisionRate.value);
|
|
FBRuleRiskGrid.setRowColData(a, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleRiskGrid.setRowColData(a, 19, fm.RateCalType.value);
|
|
FBRuleRiskGrid.setRowColData(a, 20, fm.RateCalTypeName.value);
|
|
FBRuleRiskGrid.setRowColData(a, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(a, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(a, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(a, 23, fm.RateCalUnit.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleRiskGrid.setRowColData(a, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleRiskGrid.setRowColData(a, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleRiskGrid.setRowColData(a, 25, fm.Remark.value);
|
|
FBRuleRiskGrid.setRowColData(a, 26, FBCont2Grid.getRowColData(j, 9));
|
|
FBRuleRiskGrid.setRowColData(a, 5, FBCont2Grid.getRowColData(j, 9));
|
|
a = a + 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
fm.RiskCode.value = "";
|
|
fm.RiskCodeName.value = "";
|
|
fm.ContPlanCode2.value = "";
|
|
fm.ContPlanCode2name.value = "";
|
|
fm.FBStyle.value = "";
|
|
fm.FBStylename.value = "";
|
|
fm.FBStyle1.value = "";
|
|
fm.FBStyle1name.value = "";
|
|
fm.FBSelfNum.value = "";
|
|
fm.ZBCommisionRate.value = "";
|
|
fm.RateCalType.value = "";
|
|
fm.RateCalTypeName.value = "";
|
|
fm.RateCalTime.value = "";
|
|
document.getElementById('td13').style.display = "none";//隐藏
|
|
fm.RateCalTimename.value = "";
|
|
fm.RateCalTime2.value = "";
|
|
fm.RateCalUnit.value = "";
|
|
fm.RateCalUnit2.value = "";
|
|
document.getElementById('td14').style.display = "none";//隐藏
|
|
fm.RateCalUnitname.value = "";
|
|
fm.Remark.value = "";
|
|
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
fm.OtherCompany.value = "";
|
|
document.getElementById('td3').style.display = "none";//隐藏
|
|
document.getElementById('ta3').style.display = "none";//隐藏
|
|
document.getElementById('td4').style.display = "none";//隐藏
|
|
document.getElementById('td5').style.display = "none";//隐藏
|
|
document.getElementById('td6').style.display = "none";//隐藏
|
|
document.getElementById('td15').style.display = "none";//隐藏
|
|
FBCont2Grid.clearData();
|
|
FBFamily2Grid.clearData();
|
|
}
|
|
if (fm.InputMode.value == "2") {
|
|
var tCount = FBFamily2Grid.mulLineCount;
|
|
if (tCount > 0) {
|
|
for (var i = 0; i < tCount; i++) {
|
|
var FBFamilyRate = FBFamily2Grid.getRowColData(i, 5);
|
|
if (FBFamilyRate != null && FBFamilyRate != "") {
|
|
if (FBFamilyRate > 1 || FBFamilyRate < 0) {
|
|
alert("再保份额只能录入0~1小数");
|
|
return;
|
|
}
|
|
if(!validateNumberFormat(FBFamily2Grid.getRowColData(i,5),1,2)){
|
|
alert("再保份额只能保留两位小数");
|
|
return false;
|
|
}
|
|
} else {
|
|
alert("再保份额不能为空");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
var lineCount = FBRuleContGrid.mulLineCount;
|
|
if (lineCount > 0) {
|
|
var num = 0;
|
|
for (var i = 0; i < lineCount; i++) {
|
|
if (FBRuleContGrid.getRowColData(i, 4).trim() == fm.ContPlanCode2.value.trim()) {
|
|
num++;
|
|
}
|
|
}
|
|
if (num > 0) {
|
|
if (!confirm("保障层级【" + fm.ContPlanCode2name.value + "】已经录入分保信息您确认要修改吗?")) {
|
|
return false;
|
|
}
|
|
}
|
|
var FBCont2line = FBCont2Grid.mulLineCount;//保障层级列表数
|
|
var FBFamily2line = FBFamily2Grid.mulLineCount;//再保公司列表数
|
|
var a = lineCount;
|
|
for (var i = 0; i < FBFamily2line; i++) {
|
|
//update by yx
|
|
for (var j = 0; j < FBCont2line; j++) {
|
|
var flag = false;
|
|
for (var k = 0; k < lineCount; k++) {
|
|
if ((FBRuleContGrid.getRowColData(k, 3) == fm.ContPlanCode2.value.trim()) && (FBRuleContGrid.getRowColData(k, 5).trim() == FBCont2Grid.getRowColData(j, 5)) && (FBRuleContGrid.getRowColData(k, 7) == FBFamily2Grid.getRowColData(i, 1)) && (FBRuleContGrid.getRowColData(k, 14) == FBFamily2Grid.getRowColData(i, 4))) {
|
|
FBRuleContGrid.setRowColData(k, 1, fm.FBType.value);
|
|
// FBRuleContGrid.setRowColData(k, 2, fm.FBTypeName.value);
|
|
if (FBRuleContGrid.getRowColData(k,1)=='5'){
|
|
|
|
FBRuleContGrid.setRowColData(k, 2, fm.OtherFBType.value);
|
|
}else{
|
|
FBRuleContGrid.setRowColData(k, 2, fm.FBTypeName.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(k, 4, fm.ContPlanCode2name.value);
|
|
FBRuleContGrid.setRowColData(k, 5, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleContGrid.setRowColData(k, 6, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleContGrid.setRowColData(k, 7, FBFamily2Grid.getRowColData(i, 1));
|
|
FBRuleContGrid.setRowColData(k, 8, FBFamily2Grid.getRowColData(i, 2));
|
|
FBRuleContGrid.setRowColData(k, 9, fm.FBStyle.value);
|
|
FBRuleContGrid.setRowColData(k, 10, fm.FBStylename.value);
|
|
FBRuleContGrid.setRowColData(k, 11, fm.FBStyle1.value);
|
|
FBRuleContGrid.setRowColData(k, 12, fm.FBStyle1name.value);
|
|
FBRuleContGrid.setRowColData(k, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleContGrid.setRowColData(k, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleContGrid.setRowColData(k, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
FBRuleContGrid.setRowColData(k, 16, fm.FBSelfNum.value);
|
|
FBRuleContGrid.setRowColData(k, 17, fm.ZBCommisionRate.value);
|
|
FBRuleContGrid.setRowColData(k, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleContGrid.setRowColData(k, 19, fm.RateCalType.value);
|
|
FBRuleContGrid.setRowColData(k, 20, fm.RateCalTypeName.value);
|
|
FBRuleContGrid.setRowColData(k, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleContGrid.setRowColData(k, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(k, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(k, 23, fm.RateCalUnit.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleContGrid.setRowColData(k, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(k, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(k, 25, fm.Remark.value);
|
|
FBRuleContGrid.setRowColData(k, 26,FBCont2Grid.getRowColData(i, 9));
|
|
FBRuleContGrid.setRowColData(k, 3,FBCont2Grid.getRowColData(i, 9));
|
|
flag = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!flag && (FBFamily2Grid.getRowColData(i, 1) == FBCont2Grid.getRowColData(j, 3))) {
|
|
FBRuleContGrid.addOne();
|
|
FBRuleContGrid.setRowColData(a, 1, fm.FBType.value);
|
|
FBRuleContGrid.setRowColData(a, 2, fm.FBTypeName.value);
|
|
FBRuleContGrid.setRowColData(a, 4, fm.ContPlanCode2name.value);
|
|
FBRuleContGrid.setRowColData(a, 5, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleContGrid.setRowColData(a, 6, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleContGrid.setRowColData(a, 7, FBFamily2Grid.getRowColData(i, 1));
|
|
FBRuleContGrid.setRowColData(a, 8, FBFamily2Grid.getRowColData(i, 2));
|
|
FBRuleContGrid.setRowColData(a, 9, fm.FBStyle.value);
|
|
FBRuleContGrid.setRowColData(a, 10, fm.FBStylename.value);
|
|
FBRuleContGrid.setRowColData(a, 11, fm.FBStyle1.value);
|
|
FBRuleContGrid.setRowColData(a, 12, fm.FBStyle1name.value);
|
|
FBRuleContGrid.setRowColData(a, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleContGrid.setRowColData(a, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleContGrid.setRowColData(a, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
FBRuleContGrid.setRowColData(a, 16, fm.FBSelfNum.value);
|
|
FBRuleContGrid.setRowColData(a, 17, fm.ZBCommisionRate.value);
|
|
FBRuleContGrid.setRowColData(a, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleContGrid.setRowColData(a, 19, fm.RateCalType.value);
|
|
FBRuleContGrid.setRowColData(a, 20, fm.RateCalTypeName.value);
|
|
FBRuleContGrid.setRowColData(a, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleContGrid.setRowColData(a, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(a, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(a, 23, fm.RateCalUnit.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleContGrid.setRowColData(a, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(a, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(a, 25, fm.Remark.value);
|
|
FBRuleContGrid.setRowColData(a, 26, FBCont2Grid.getRowColData(i, 9));
|
|
FBRuleContGrid.setRowColData(a, 3, FBCont2Grid.getRowColData(i, 9));
|
|
a = a + 1;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
var FBCont2line = FBCont2Grid.mulLineCount;//保障层级列表数
|
|
var FBFamily2line = FBFamily2Grid.mulLineCount;//再保公司列表数
|
|
var a = lineCount;
|
|
for (var i = 0; i < FBFamily2line; i++) {
|
|
for (var j = 0; j < FBCont2line; j++) {
|
|
if((FBFamily2Grid.getRowColData(i, 1) == FBCont2Grid.getRowColData(j, 3))){
|
|
FBRuleContGrid.addOne();
|
|
FBRuleContGrid.setRowColData(a, 1, fm.FBType.value);
|
|
FBRuleContGrid.setRowColData(a, 2, fm.FBTypeName.value);
|
|
FBRuleContGrid.setRowColData(a, 4, fm.ContPlanCode2name.value);
|
|
FBRuleContGrid.setRowColData(a, 5, FBCont2Grid.getRowColData(j, 5));
|
|
FBRuleContGrid.setRowColData(a, 6, FBCont2Grid.getRowColData(j, 6));
|
|
FBRuleContGrid.setRowColData(a, 7, FBFamily2Grid.getRowColData(i, 1));
|
|
FBRuleContGrid.setRowColData(a, 8, FBFamily2Grid.getRowColData(i, 2));
|
|
FBRuleContGrid.setRowColData(a, 9, fm.FBStyle.value);
|
|
FBRuleContGrid.setRowColData(a, 10, fm.FBStylename.value);
|
|
FBRuleContGrid.setRowColData(a, 11, fm.FBStyle1.value);
|
|
FBRuleContGrid.setRowColData(a, 12, fm.FBStyle1name.value);
|
|
FBRuleContGrid.setRowColData(a, 13, FBFamily2Grid.getRowColData(i, 3));
|
|
FBRuleContGrid.setRowColData(a, 14, FBFamily2Grid.getRowColData(i, 4));
|
|
FBRuleContGrid.setRowColData(a, 15, FBFamily2Grid.getRowColData(i, 5));
|
|
FBRuleContGrid.setRowColData(a, 16, fm.FBSelfNum.value);
|
|
FBRuleContGrid.setRowColData(a, 17, fm.ZBCommisionRate.value);
|
|
FBRuleContGrid.setRowColData(a, 18, FBCont2Grid.getRowColData(j, 8));
|
|
FBRuleContGrid.setRowColData(a, 19, fm.RateCalType.value);
|
|
FBRuleContGrid.setRowColData(a, 20, fm.RateCalTypeName.value);
|
|
FBRuleContGrid.setRowColData(a, 21, fm.RateCalTime.value);
|
|
if (fm.RateCalTime2.value != null && fm.RateCalTime2.value != "") {
|
|
FBRuleContGrid.setRowColData(a, 22, fm.RateCalTime2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(a, 22, fm.RateCalTimename.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(a, 23, fm.RateCalUnit.value);
|
|
FBRuleContGrid.setRowColData(a, 24, fm.RateCalUnitname.value);
|
|
if (fm.RateCalUnit2.value != null && fm.RateCalUnit2.value != "") {
|
|
FBRuleContGrid.setRowColData(a, 24, fm.RateCalUnit2.value);
|
|
} else {
|
|
FBRuleContGrid.setRowColData(a, 24, fm.RateCalUnitname.value);
|
|
}
|
|
FBRuleContGrid.setRowColData(a, 25, fm.Remark.value);
|
|
FBRuleContGrid.setRowColData(a, 26, FBCont2Grid.getRowColData(j, 9));
|
|
FBRuleContGrid.setRowColData(a, 3, FBCont2Grid.getRowColData(j, 9));
|
|
a = a + 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fm.RiskCode.value = "";
|
|
fm.RiskCodeName.value = "";
|
|
fm.ContPlanCode2.value = "";
|
|
fm.ContPlanCode2name.value = "";
|
|
fm.FBStyle.value = "";
|
|
fm.FBStylename.value = "";
|
|
fm.FBStyle1.value = "";
|
|
fm.FBStyle1name.value = "";
|
|
fm.FBSelfNum.value = "";
|
|
fm.ZBCommisionRate.value = "";
|
|
fm.RateCalType.value = "";
|
|
fm.RateCalTypeName.value = "";
|
|
fm.RateCalTime.value = "";
|
|
document.getElementById('td13').style.display = "none";//隐藏
|
|
fm.RateCalTimename.value = "";
|
|
fm.RateCalTime2.value = "";
|
|
fm.RateCalUnit.value = "";
|
|
fm.RateCalUnit2.value = "";
|
|
document.getElementById('td14').style.display = "none";//隐藏
|
|
fm.RateCalUnitname.value = "";
|
|
fm.Remark.value = "";
|
|
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
fm.OtherCompany.value = "";
|
|
document.getElementById('td3').style.display = "none";//隐藏
|
|
document.getElementById('ta3').style.display = "none";//隐藏
|
|
document.getElementById('td4').style.display = "none";//隐藏
|
|
document.getElementById('td5').style.display = "none";//隐藏
|
|
document.getElementById('td6').style.display = "none";//隐藏
|
|
document.getElementById('td15').style.display = "none";//隐藏
|
|
FBCont2Grid.clearData("FBCont2Grid");
|
|
FBFamily2Grid.clearData("FBFamily2Grid");
|
|
}
|
|
}
|
|
|
|
/*********************************************************************
|
|
* "取消"按钮对应操作
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function cancelForm() {
|
|
fm.RiskCode.value = "";
|
|
fm.RiskCodeName.value = "";
|
|
fm.ContPlanCode2.value = "";
|
|
fm.ContPlanCode2name.value = "";
|
|
fm.FBStyle.value = "";
|
|
fm.FBStylename.value = "";
|
|
fm.FBStyle1.value = "";
|
|
fm.FBStyle1name.value = "";
|
|
fm.FBSelfNum.value = "";
|
|
fm.ZBCommisionRate.value = "";
|
|
fm.RateCalTime.value = "";
|
|
fm.RateCalTime2.value = "";
|
|
fm.RateCalTimename.value = "";
|
|
fm.RateCalUnit.value = "";
|
|
fm.RateCalUnit2.value = "";
|
|
fm.RateCalUnitname.value = "";
|
|
fm.Remark.value = "";
|
|
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
FBCont2Grid.clearData("FBCont2Grid");
|
|
FBFamily2Grid.clearData("FBFamily2Grid");
|
|
FBRuleRiskGrid.clearData("FBRuleRiskGrid");
|
|
FBRuleContGrid.clearData("FBRuleContGrid");
|
|
}
|
|
|
|
|
|
/*********************************************************************
|
|
* "查询与本询价已有的分保规则
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function AskFBRuleQuery(flag) {
|
|
if (flag == 1) {
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql9");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (arrResult != null) {
|
|
fm.InputMode.value = arrResult[0][0];
|
|
fm.InputModeName.value = arrResult[0][1];
|
|
}
|
|
}
|
|
if (fm.InputMode.value == "1") {
|
|
divShowOne.style.display = "";
|
|
divFBRuleRisk.style.display = "";
|
|
divFBRuleCont.style.display = "none";
|
|
divShowTwo.style.display = "";
|
|
divFBCont.style.display = "";
|
|
divFBCont2.style.display = "";
|
|
divFBFamily.style.display = "";
|
|
divFBFamily2.style.display = "";
|
|
document.getElementById('td1').style.display = "none";//显示
|
|
document.getElementById('td2').style.display = "none";//显示
|
|
document.getElementById('td7').style.display = "none";//显示
|
|
document.getElementById('td8').style.display = "none";//显示
|
|
document.getElementById('td9').style.display = "";//显示
|
|
document.getElementById('td10').style.display = "";//显示
|
|
document.getElementById('td11').style.display = "";//显示
|
|
document.getElementById('td12').style.display = "";//显示
|
|
// 回显LSQuotFBSql7
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql7");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
// turnPage.queryModal(tSQLInfo.getString(), FBRuleRiskGrid, 0, 1);
|
|
|
|
turnPage.strQueryResult = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1,0,1);//add by zzt突破200行限制 企补统推系统
|
|
if (!turnPage.strQueryResult)
|
|
{
|
|
return;
|
|
}
|
|
|
|
//查询成功则拆分字符串,返回二维数组
|
|
turnPage.arrDataCacheSet = decodeEasyQueryResult(turnPage.strQueryResult,0,1);//add by zzt突破200行限制 企补统推系统
|
|
//设置初始化过的MULTILINE对象,VarGrid为在初始化页中定义的全局变量
|
|
turnPage.pageDisplayGrid = FBRuleRiskGrid;
|
|
//保存SQL语句
|
|
turnPage.strQuerySql = tSQLInfo.getString();
|
|
//设置查询起始位置
|
|
turnPage.pageIndex = 0;
|
|
//在查询结果数组中取出符合页面显示大小设置的数组
|
|
//调用MULTILINE对象显示查询结果
|
|
displayMultiline(turnPage.arrDataCacheSet, turnPage.pageDisplayGrid);
|
|
|
|
|
|
}
|
|
if (fm.InputMode.value == "2") {
|
|
divShowOne.style.display = "";
|
|
divFBRuleRisk.style.display = "none";
|
|
divFBRuleCont.style.display = "";
|
|
divShowTwo.style.display = "";
|
|
divFBCont.style.display = "";
|
|
divFBCont2.style.display = "";
|
|
divFBFamily.style.display = "";
|
|
divFBFamily2.style.display = "";
|
|
|
|
document.getElementById('td1').style.display = "";//显示
|
|
document.getElementById('td2').style.display = "";//显示
|
|
document.getElementById('td7').style.display = "";//显示
|
|
document.getElementById('td8').style.display = "";//显示
|
|
document.getElementById('td9').style.display = "none";//显示
|
|
document.getElementById('td10').style.display = "none";//显示
|
|
document.getElementById('td11').style.display = "none";//显示
|
|
document.getElementById('td12').style.display = "none";//显示
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql8");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
// turnPage.queryModal(tSQLInfo.getString(), FBRuleContGrid, 0, 1);
|
|
turnPage.strQueryResult = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1,0,1);//add by zzt突破200行限制 企补统推系统
|
|
if (!turnPage.strQueryResult)
|
|
{
|
|
return;
|
|
}
|
|
|
|
//查询成功则拆分字符串,返回二维数组
|
|
turnPage.arrDataCacheSet = decodeEasyQueryResult(turnPage.strQueryResult,0,1);//add by zzt突破200行限制 企补统推系统
|
|
//设置初始化过的MULTILINE对象,VarGrid为在初始化页中定义的全局变量
|
|
turnPage.pageDisplayGrid = FBRuleContGrid;
|
|
//保存SQL语句
|
|
turnPage.strQuerySql = tSQLInfo.getString();
|
|
//设置查询起始位置
|
|
turnPage.pageIndex = 0;
|
|
//在查询结果数组中取出符合页面显示大小设置的数组
|
|
//调用MULTILINE对象显示查询结果
|
|
displayMultiline(turnPage.arrDataCacheSet, turnPage.pageDisplayGrid);
|
|
}
|
|
// }
|
|
}
|
|
|
|
|
|
/*********************************************************************
|
|
* 是否显示可以操作的按钮
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function isShowdivActionFlag() {
|
|
if (fm.LoadFlag.value != null && fm.LoadFlag.value == "1") {
|
|
divActionFlag.style.display = "none";
|
|
addClickButton.style.display = "none";
|
|
} else {
|
|
divActionFlag.style.display = "";
|
|
addClickButton.style.display = "";
|
|
}
|
|
//临分需求 add by cj
|
|
// var askPtrNoSql = " select distinct 1 from askprt where askno='" + fm.AskNo.value + "' ";
|
|
// var arrResult = easyExecSql(askPtrNoSql);
|
|
// fm.AskPrtNo.value = arrResult;
|
|
// if (arrResult != null && arrResult.length > 0) {
|
|
// fm.PrtQueryButton.disabled = false;
|
|
// } else {
|
|
// fm.PrtQueryButton.disabled = true;
|
|
// }
|
|
}
|
|
|
|
function afterCodeSelect(cCodeName, Field) {
|
|
//临分信息与再保险管理系统对接需求 add by cj
|
|
if (cCodeName == "InputMode") {
|
|
if (fm.InputMode.value == "1") {
|
|
divShowOne.style.display = "";
|
|
divFBRuleRisk.style.display = "";
|
|
divFBRuleCont.style.display = "none";
|
|
divShowTwo.style.display = "";
|
|
divFBCont.style.display = "";
|
|
divFBCont2.style.display = "";
|
|
divFBFamily.style.display = "";
|
|
divFBFamily2.style.display = "";
|
|
document.getElementById('td1').style.display = "none";//显示
|
|
document.getElementById('td2').style.display = "none";//显示
|
|
document.getElementById('td7').style.display = "none";//显示
|
|
document.getElementById('td8').style.display = "none";//显示
|
|
document.getElementById('td06').style.display = "none";//显示
|
|
document.getElementById('td9').style.display = "";//显示
|
|
document.getElementById('td10').style.display = "";//显示
|
|
document.getElementById('td11').style.display = "";//显示
|
|
document.getElementById('td12').style.display = "";//显示
|
|
AskFBRuleQuery(2);
|
|
|
|
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
|
|
FBCont2Grid.clearData();
|
|
FBFamily2Grid.clearData();
|
|
}
|
|
if (fm.InputMode.value == "2") {
|
|
divShowOne.style.display = "";
|
|
divFBRuleRisk.style.display = "none";
|
|
divFBRuleCont.style.display = "";
|
|
divShowTwo.style.display = "";
|
|
divFBCont.style.display = "";
|
|
divFBCont2.style.display = "";
|
|
divFBFamily.style.display = "";
|
|
divFBFamily2.style.display = "";
|
|
|
|
document.getElementById('td1').style.display = "";//显示
|
|
document.getElementById('td2').style.display = "";//显示
|
|
document.getElementById('td7').style.display = "";//显示
|
|
document.getElementById('td8').style.display = "";//显示
|
|
document.getElementById('td9').style.display = "none";//显示
|
|
document.getElementById('td10').style.display = "none";//显示
|
|
document.getElementById('td11').style.display = "none";//显示
|
|
document.getElementById('td12').style.display = "none";//显示
|
|
AskFBRuleQuery(2);
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
|
|
FBCont2Grid.clearData();
|
|
FBFamily2Grid.clearData();
|
|
}
|
|
}
|
|
//临分方式
|
|
if (cCodeName == "FBStyle1") {
|
|
if (fm.FBStyle1.value == "1") {
|
|
document.getElementById('ta3').style.display = "";//显示
|
|
document.getElementById('td3').style.display = "none";//显示
|
|
document.getElementById('td4').style.display = "";//显示
|
|
document.getElementById('td06').style.display = "none";//显示
|
|
document.getElementById('td5').style.display = "none";//显示
|
|
document.getElementById('td6').style.display = "none";//显示
|
|
document.getElementById('ts1').style.display = "none";//隐藏
|
|
}
|
|
if (fm.FBStyle1.value == "2") {
|
|
document.getElementById('ta3').style.display = "none";//显示
|
|
document.getElementById('td3').style.display = "";//显示
|
|
document.getElementById('td4').style.display = "";//显示
|
|
document.getElementById('td06').style.display = "";//显示
|
|
document.getElementById('td5').style.display = "";//显示
|
|
document.getElementById('td6').style.display = "";//显示
|
|
document.getElementById('ts1').style.display = "";//显示
|
|
}
|
|
}
|
|
if (cCodeName == "RateCalTime") {
|
|
if (fm.RateCalTime.value == "4") {
|
|
document.getElementById('td13').style.display = "";//显示
|
|
} else {
|
|
document.getElementById('td13').style.display = "none";//显示
|
|
}
|
|
}
|
|
if (cCodeName == "getratecalunit") {
|
|
|
|
if (fm.RateCalUnit.value == "5") {
|
|
document.getElementById('td14').style.display = "";//显示
|
|
} else {
|
|
document.getElementById('td14').style.display = "none";//显示
|
|
}
|
|
}
|
|
if (cCodeName == "fbcompany") {
|
|
|
|
if (fm.FBCompanyName.value == "其他") {
|
|
fm.OtherCompany.value = "";
|
|
document.getElementById('td15').style.display = "";//显示
|
|
} else {
|
|
document.getElementById('td15').style.display = "none";//显示
|
|
}
|
|
|
|
var arrResult = new Array();
|
|
tSQLInfo = new SqlClass();
|
|
if (fm.InputMode.value == "1") {//按险种维护
|
|
if (fm.RiskCode.value == "" || fm.RiskCode.value == 'NULL') {
|
|
alert("请先选择险种信息!");
|
|
}
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql2");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(fm.RiskCode.value);
|
|
}
|
|
if (fm.InputMode.value == "2") {//按方案维护
|
|
if (fm.ContPlanCode2.value == "" || fm.ContPlanCode2.value == 'NULL') {
|
|
alert("请先选择险种信息!");
|
|
}
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql2c");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(fm.ContPlanCode2.value);
|
|
}
|
|
|
|
|
|
arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
|
|
if (arrResult != null) {
|
|
var lineCount = FBFamily2Grid.mulLineCount;
|
|
if (lineCount > 0) {
|
|
for (var i = 0; i < arrResult.length; i++) {
|
|
for (var j = 0; j < lineCount; j++) {
|
|
if (/*((FBFamily2Grid.getRowColData(j, 1).trim() == fm.RiskCode.value.trim()) || (FBFamily2Grid.getRowColData(j, 1).trim() == fm.RiskCode2.value.trim())) &&*/ (FBFamily2Grid.getRowColData(j, 3).trim() == fm.FBCompany.value.trim())) {
|
|
alert("该再保公司已添加,请勿重复添加!");
|
|
return false;
|
|
}
|
|
if (fm.FBCompanyName.value == "其他") {
|
|
if (/*((FBFamily2Grid.getRowColData(j, 1).trim() == fm.RiskCode.value.trim()) || (FBFamily2Grid.getRowColData(j, 1).trim() == fm.RiskCode2.value.trim())) &&*/ (FBFamily2Grid.getRowColData(j, 4).trim() == fm.OtherCompany.value.trim())) {
|
|
alert("该再保公司已添加,请勿重复添加!");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
FBFamily2Grid.addOne();
|
|
FBFamily2Grid.setRowColData(lineCount + i, 1, arrResult[i][0]);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 2, arrResult[i][1]);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 3, fm.FBCompany.value);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 4, fm.FBCompanyName.value);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 5, "");
|
|
}
|
|
|
|
} else {
|
|
for (var i = 0; i < arrResult.length; i++) {
|
|
FBFamily2Grid.addOne();
|
|
FBFamily2Grid.setRowColData(i, 1, arrResult[i][0]);
|
|
FBFamily2Grid.setRowColData(i, 2, arrResult[i][1]);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 3, fm.FBCompany.value);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 4, fm.FBCompanyName.value);
|
|
FBFamily2Grid.setRowColData(lineCount + i, 5, "");
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
if (cCodeName == "getriskcode") {
|
|
|
|
//根据lmriskparamsdef表来确定是费率计量方式还是时间
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql4");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
|
|
|
|
var tSFlagarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tSFlagarrResult != null) {
|
|
document.getElementById('td16').style.display = "";
|
|
document.getElementById('td17').style.display = "";
|
|
document.getElementById('td18').style.display = "none";
|
|
document.getElementById('td19').style.display = "none";
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql5");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(Field.value);
|
|
arrResult =easyExecSql(tSQLInfo.getString(), 1, 0, 1)
|
|
if (arrResult != null) {
|
|
fm.RateCalType.value = arrResult[0][0];
|
|
fm.RateCalTypeName.value = arrResult[0][1];
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
document.getElementById('td16').style.display = "none";
|
|
document.getElementById('td17').style.display = "none";
|
|
document.getElementById('td18').style.display = "";
|
|
document.getElementById('td19').style.display = "";
|
|
}
|
|
//fm.ContPlanCode.value = "";
|
|
//fm.ContPlanName.value = "";
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
|
|
FBCont2Grid.clearData();
|
|
FBFamily2Grid.clearData();
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql1");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(Field.value);
|
|
turnPage.queryModal(tSQLInfo.getString(), FBCont2Grid, 0, 1);
|
|
|
|
}
|
|
if (cCodeName == "getcontplancode"){ //codename 等于showCodeList('getcontplancode',)
|
|
if(Field.value !=""){//当选择按方案维护 双击保障层级时 填充 下面险种相关信息
|
|
fm.FBCompany.value = "";
|
|
fm.FBCompanyName.value = "";
|
|
|
|
FBCont2Grid.clearData();
|
|
FBFamily2Grid.clearData();
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql6");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(Field.value);
|
|
turnPage.queryModal(tSQLInfo.getString(), FBCont2Grid, 0, 1);
|
|
|
|
|
|
//并且修改费率计量
|
|
//根据lmriskparamsdef表来确定是费率计量方式还是时间
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql4");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
|
|
|
|
var tSFlagarrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
|
|
if (tSFlagarrResult != null) {
|
|
document.getElementById('td16').style.display = "";
|
|
document.getElementById('td17').style.display = "";
|
|
document.getElementById('td18').style.display = "none";
|
|
document.getElementById('td19').style.display = "none";
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotFBSql");
|
|
tSQLInfo.setSqlId("LSQuotFBSql55");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.addSubPara(Field.value);
|
|
arrResult =easyExecSql(tSQLInfo.getString(), 1, 0, 1)
|
|
if (arrResult != null) {
|
|
fm.RateCalType.value = arrResult[0][0];
|
|
fm.RateCalTypeName.value = arrResult[0][1];
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
document.getElementById('td16').style.display = "none";
|
|
document.getElementById('td17').style.display = "none";
|
|
document.getElementById('td18').style.display = "";
|
|
document.getElementById('td19').style.display = "";
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//当选择按方案维护 双击保障层级时走这
|
|
function getContPlanCode2(cObjCode, cObjName) {
|
|
return showCodeList('getcontplancode', [cObjCode, cObjName], [0, 1], null, fm.QuotNo.value, 'QuotNo', 1);
|
|
}
|
|
|
|
//临分需求 投保单查询按钮 add by cj
|
|
function prtQuery() {
|
|
|
|
window.open("./FBAskPrtQueryInput.jsp?AskNo=" + fm.AskNo.value, "投保单查询界面", "width=1000, height=600, top=50, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no");
|
|
|
|
}
|
|
|
|
function addZBCompany() {
|
|
var lineCount = FBFamily2Grid.mulLineCount;
|
|
if (fm.OtherCompany.value == null || fm.OtherCompany.value == "") {
|
|
FBFamily2Grid.setRowColData(lineCount - 1, 4, fm.FBCompanyName.value);
|
|
return false;
|
|
}
|
|
if (lineCount > 0) {
|
|
for (var i = 0; i < lineCount; i++) {
|
|
if (FBFamily2Grid.getRowColData(i, 4).trim() == fm.OtherCompany.value.trim()) {
|
|
alert("该再保公司已添加,请勿重复添加!");
|
|
return false;
|
|
}
|
|
}
|
|
if (fm.FBCompanyName.value == "其他") {
|
|
FBFamily2Grid.setRowColData(lineCount - 1, 4, fm.OtherCompany.value);
|
|
} else {
|
|
FBFamily2Grid.setRowColData(lineCount - 1, 4, fm.FBCompanyName.value);
|
|
}
|
|
}
|
|
}
|
|
|
|
//建工险于非建工险费率的计量单位 临分信息与再保险管理系统对接需求 add by qzc
|
|
function getRateCalUnit(cObjCode, cObjName) {
|
|
|
|
return showCodeList('getratecalunit', [cObjCode, cObjName], [0, 1], null, fm.QuotNo.value, 'QuotNo', 1);
|
|
|
|
|
|
} |