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.
 
 
 

233 lines
8.0 KiB

/***************************************************************
* <p>ProName:EdorOBInput.js</p>
* <p>Title:线上保全业务开通</p>
* <p>Description:线上保全业务开通</p>
* <p>Copyright:Copyright (c) 2012</p>
* <p>Company:Sinosoft</p>
* @author : fxl
* @version : 8.0
* @date : 2025-01-20
****************************************************************/
var showInfo;
var turnPage = new turnPageClass();
var turnPage1 = new turnPageClass();
var turnPage2 = new turnPageClass();
var mOperate = "";//操作状态
var tSQLInfo = new SqlClass();
//整单退保被保险人查询
function queryOldClick(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorOBSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorOBSql1");
tSQLInfo.addSubPara(tGrpContNo);
turnPage1.queryModal(tSQLInfo.getString(), OldEdorTypeGrid, 1, 1);
}
function queryNewClick(){
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorOBSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorOBSql2");
tSQLInfo.addSubPara(tEdorNo);
tSQLInfo.addSubPara(tEdorType);
turnPage1.queryModal(tSQLInfo.getString(), NewEdorTypeGrid, 1, 1);
}
function NewEdorTypeClick(){
var tSelNo = NewEdorTypeGrid.getSelNo();
var tEdorCode = NewEdorTypeGrid.getRowColData(tSelNo-1, 1);
var tEdorCodeName = NewEdorTypeGrid.getRowColData(tSelNo-1, 2);
var tStartData = NewEdorTypeGrid.getRowColData(tSelNo-1, 3);
var tEndData = NewEdorTypeGrid.getRowColData(tSelNo-1, 4);
document.all('EdorCode').value=tEdorCode;
document.all('EdorCodeName').value=tEdorCodeName;
document.all('StartDate').value=tStartData;
document.all('EndData').value=tEndData;
}
function initNewEdorTypeValue(){
document.all('EdorCode').value="";
document.all('EdorCodeName').value="";
document.all('StartDate').value="";
document.all('EndData').value="";
}
//增加按钮
function addClick(){
if(!verifyForm("fm")){
return false;
}
var mEdorType = document.all('EdorCode').value;
if(mEdorType == null || mEdorType == ""){
i18nAlert("保全项目不能为空!", "LIS-04849");
return false;
}
var tStartDate = document.all('StartDate').value;
if(tStartDate == null || tStartDate == ""){
i18nAlert("请输入开始日期!", "LIS-16315");
return false;
}
//查询保单的生效日期和终止日期
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorOBSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorOBSql3");
tSQLInfo.addSubPara(tGrpContNo);
var upArrResul= easyExecSql(tSQLInfo.getString());
var tCvailDate = "";
var ContEndDate = "";
if(upArrResul != null){
tCvailDate = upArrResul[0][0];
ContEndDate =upArrResul[0][1];
}
var tEndDate = document.all('EndData').value;
if(tStartDate < tCvailDate || tStartDate > ContEndDate){
i18nAlert("输入的开始日期需在保单的有效期内,请核实!", "LIS-BQ-0048");
return false;
}
if(tEndDate != ''){
if( tStartDate > tEndDate){
i18nAlert("输入的开始日期不能大于结束日期,请核实", "LIS-02110");
return false;
}
if(tEndDate > ContEndDate || tEndDate < tCvailDate){
i18nAlert("输入的结束日期需在保单的有效期内,请核实!", "LIS-BQ-0049");
return false;
}
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorOBSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorOBSql4");
tSQLInfo.addSubPara(tGrpContNo);
tSQLInfo.addSubPara(mEdorType);
tSQLInfo.addSubPara(tEdorNo);
var ArrResul= easyExecSql(tSQLInfo.getString());
if(ArrResul != null){
i18nAlert("本次新增的保全项目已申请开通线上保全,请核实!", "LIS-BQ-0051");
return false;
}
mOperate="ADD";
fm.action="../API/grp_pa/g_pos/EdorOBSave/ADD?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo;
submitFunc();
ajaxSubmit2(document.getElementById("fm"));
queryNewClick();
initNewEdorTypeValue();
}
//保存信息
function deleteClick(){
var tSelNo = NewEdorTypeGrid.getSelNo();
if (tSelNo==0) {
i18nAlert("请选择需要操作的信息!", "LIS-03017");
return false;
}
mOperate="DELETE";
fm.action="../API/grp_pa/g_pos/EdorOBSave/ADD?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo;
submitFunc();
ajaxSubmit2(document.getElementById("fm"));
queryNewClick();
initNewEdorTypeValue();
}
//保存信息
function saveClick(){
if (NewEdorTypeGrid.mulLineCount < 1) {
i18nAlert("请先新增本次变更保全项目后再保存!", "LIS-BQ-0050");
return false;
}
mOperate="SAVE";
fm.action="../API/grp_pa/g_pos/EdorOBSave/ADD?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo;
submitFunc();
ajaxSubmit2(document.getElementById("fm"));
}
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 returnbak() {
top.opener.initForm();
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; //获得窗口的水平位置
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();
}
}
function afterCodeSelect(o, p) {
if(o=='queryexp') {
if(p.value=='21') {
divCalName.style.display = "none";
divCalCode.style.display = "none";
} else if(p.value=='22'){
divCalName.style.display = "";
divCalCode.style.display = "";
}
}
}