/*************************************************************** *
ProName:EdorCheckDetailInput.js
*Title:保全复核
*Description:保全复核
*Copyright:Copyright (c) 2012
*Company:Sinosoft
* @author : zhoufz * @version : 8.0 * @date : 2014-06-16 ****************************************************************/ var showInfo; var turnPage = new turnPageClass(); var turnPage1 = new turnPageClass(); var mOperate = "";//操作状态 var tSQLInfo = new SqlClass(); /** * 受理信息查询 */ function queryEdorAppInfo() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.EdorMassCheckQualitySQL"); tSQLInfo.setSqlId("queryEdorAppInfo"); tSQLInfo.addSubPara(tEdorAppNo); var strQueryResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (strQueryResult != null) { fm.AppMode.value = strQueryResult[0][1]; fm.AppDate.value = strQueryResult[0][2]; fm.ReceiveDate.value = strQueryResult[0][3]; fm.AcceptDate.value = strQueryResult[0][4]; fm.PolicyNo.value = strQueryResult[0][5]; fm.HidGrpContNo.value = strQueryResult[0][5]; fm.AppntName.value = strQueryResult[0][6]; fm.ValDate.value = strQueryResult[0][7]; fm.PayIntv.value = strQueryResult[0][8]; fm.BanlanceFlag.value = strQueryResult[0][9]; fm.AfterClmRule.value = strQueryResult[0][10]; fm.EdorNo.value = strQueryResult[0][11]; } else { i18nAlert("查询保全受理信息失败!", "LIS-03025"); return false; } } /** * 保全项目查询 */ function queryEdorTypeInfo() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.EdorMassCheckQualitySQL"); tSQLInfo.setSqlId("EdorCheckSql2"); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(fm.EdorNo.value); turnPage1.queryModal(tSQLInfo.getString(), EdorTypeGrid, 1, 1); } /** * 保全项目明细 */ function detailClick() { var tSelNo = EdorTypeGrid.getSelNo(); if (tSelNo == 0) { i18nAlert("请选择一个保全项目!", "LIS-03026"); return false; } var tEdorType = EdorTypeGrid.getRowColData(tSelNo - 1, 1); window.open("./EdorTypeDetailMain.jsp?EdorAppNo=" + tEdorAppNo + "&EdorNo=" + fm.EdorNo.value + "&GrpContNo=" + tGrpContNo + "&EdorType=" + tEdorType, null, 'width=' + screen.availWidth + ',height=' + screen.availHeight + ',top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0'); } /** * 提交数据 */ function submitForm(obj) { 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"); 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(); ajaxSubmit2(obj); } /** * 提交后操作,服务器数据返回后执行的操作 */ function afterSubmit(FlagStr, content, patch, fileName1) { if (typeof (showInfo) == "object") { 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(); initForm(); } } /** * 提交前的校验、计算 */ function beforeSubmit() { //系统的校验方法 if (!verifyInput2()) { return false; } return true; } /** * 审查保存 */ function QualityClick() { if (!verifyInput2()) { return false; } if (fm.IfError.value == "1") { // 尝试将字符串转换为数字 const num = Number(fm.LoseScores.value); if (fm.LoseScores.value.length < 1 || num == 0) { i18nAlert("扣分分值不能空或0", null); return false; } // 检查是否为有效数字 if (isNaN(num)) { i18nAlert("扣分分值输入不是一个有效的数字", null); return false; } const reg = /^[1-9]\d*$/ //注意此处细节 if (reg.test(num) == false) { alert("扣分分值只能为正整数!"); return false; } // 检查数字是否在0到-100之间(包括边界) if (num < 0 || num > 100) { i18nAlert("扣分分值必须在0到100之间", null); return false; } if (fm.ErrorDetails.value.length < 1) { i18nAlert("差错描述不能为空", null); return false; } } else { if (fm.LoseScores.value != 0) { i18nAlert("差错类型为0时,《扣分分值》为0", null); return false; } if (fm.ErrorDetails.value.length > 0) { i18nAlert("差错类型为0时,《差错描述》为空", null); return false; } } fm.GrpContNo.value = tGrpContNo; fm.PatchNo.value = tPatchNo; fm.EdorAcceptNo.value = tEdorAppNo; fm.Operate.value = "CONFIRM"; fm.action = "../API/grp_pa/g_pos/EdorMassCheckQualitySave/CONFIRM"; submitForm(fm); } /** * 返回查询页面 */ function returnC() { top.close(); } /** * 保单查询 */ function ContInfo() { var tSelNo = EdorTypeGrid.getSelNo()-1; if (tSelNo<0) { i18nAlert("请选中一条投保信息", "LIS-01940"); return false; } strUrl="../g_app/LCGrpContPolInput.jsp?GrpPropNo="+ tGrpContNo+"&GrpContNo="+tGrpContNo+"&Flag=3" ; window.open(strUrl,'','width='+screen.availWidth+',height='+screen.availHeight+',channelmode=yes,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0'); } function saveSubmit() { if (!verifyInput2()) { return false; } if (fm.IfError.value == "1") { if (fm.LoseScores.value.length < 1 || fm.LoseScores.value == '0') { i18nAlert("扣分分值不能空或0", null); return false; } // 尝试将字符串转换为数字 const num = Number(fm.LoseScores.value); // 检查是否为有效数字 if (isNaN(num)) { i18nAlert("扣分分值输入不是一个有效的数字", null); return false; } const reg = /^[1-9]\d*$/ //注意此处细节 if (reg.test(num) == false) { alert("扣分分值只能为正整数!"); return false; } if (num < 0 || num > 100) { i18nAlert("扣分分值必须在0到100之间", null); return false; } if (fm.ErrorDetails.value.length < 1) { i18nAlert("差错描述不能为空", null); return false; } } else { if (fm.LoseScores.value != 0) { i18nAlert("差错类型为0时,《扣分分值》为0", null); return false; } if (fm.ErrorDetails.value.length > 0) { i18nAlert("差错类型为0时,《差错描述》为空", null); return false; } } fm.GrpContNo.value = tGrpContNo; fm.PatchNo.value = tPatchNo; fm.EdorAcceptNo.value = tEdorAppNo; fm.Operate.value = "SAVE"; fm.action = "../API/grp_pa/g_pos/EdorMassCheckQualitySave/SAVE"; submitForm(fm); } function queryQuality() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.EdorMassCheckQualitySQL"); tSQLInfo.setSqlId("queryQualityInfo"); tSQLInfo.addSubPara(tGrpContNo); tSQLInfo.addSubPara(tEdorAppNo); tSQLInfo.addSubPara(tPatchNo); var strQueryResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (strQueryResult != null && strQueryResult[0][0] != "") { fm.IfError.value = strQueryResult[0][0]; if (fm.IfError.value == "1") { fm.IfErrorName.value = "是" } else if (fm.IfError.value == "0") { fm.IfErrorName.value = "否" } fm.LoseScores.value = strQueryResult[0][1]; fm.ErrorDetails.value = strQueryResult[0][2]; } } function queryEdorQuality() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_pa"); tSQLInfo.setResourceName("g_pos.EdorMassCheckQualitySQL"); tSQLInfo.setSqlId("queryEdorQualityInfo"); tSQLInfo.addSubPara(document.all("EdorNo").value); var strQueryResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1); if (strQueryResult != null ) { fm.CheckResult.value = strQueryResult[0][0]; if (fm.CheckResult.value == "0") { fm.CheckResultName.value = "同意" } else if (fm.CheckResult.value == "9") { fm.CheckResultName.value = "拒保" } fm.Approver.value = strQueryResult[0][1]; fm.ApproverDesc.value = strQueryResult[0][2]; } }