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.
198 lines
6.6 KiB
198 lines
6.6 KiB
/***************************************************************
|
|
* <p>ProName:EdorVRInput.js</p>
|
|
* <p>Title:被保险人归属规则变更</p>
|
|
* <p>Description:被保险人归属规则变更</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : 蔡云聪
|
|
* @version : 8.0
|
|
* @date : 2014-06-13
|
|
****************************************************************/
|
|
|
|
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.EdorVRSql");
|
|
tSQLInfo.setSqlId("EdorVRSql1");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(fm.OldInsuredName.value);
|
|
tSQLInfo.addSubPara(fm.OldInsuredIDNo.value);
|
|
tSQLInfo.addSubPara(fm.OldInsuredNo.value);
|
|
tSQLInfo.addSubPara(fm.OldPosition.value);
|
|
tSQLInfo.addSubPara(tEdorAppNo);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage1.queryModal(tSQLInfo.getString(), OldInsuredInfoGrid, 1, 1);
|
|
|
|
if(!turnPage1.strQueryResult){
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03011");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//修改过的被保险人信息查询
|
|
function queryUpClick(o){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorVRSql");
|
|
tSQLInfo.setSqlId("EdorVRSql2");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorAppNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
tSQLInfo.addSubPara(NullToEmpty(tEdorNo));
|
|
tSQLInfo.addSubPara(fm.InsuredName.value);
|
|
tSQLInfo.addSubPara(fm.InsuredIDNo.value);
|
|
tSQLInfo.addSubPara(fm.NewPosition.value);
|
|
tSQLInfo.addSubPara(fm.BatchNo.value);
|
|
tSQLInfo.setModule("grp_pa");
|
|
|
|
turnPage2.queryModal(tSQLInfo.getString(), UpdateInsuredInfoGrid, 1, 1);
|
|
|
|
if(o=='1'){
|
|
if(!turnPage2.strQueryResult){
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03011");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
//撤销操作
|
|
function deleteOperate(){
|
|
|
|
var rowNum = UpdateInsuredInfoGrid.mulLineCount;
|
|
var tRow = 0;
|
|
|
|
for (var index=0;index<rowNum;index++) {
|
|
|
|
if (UpdateInsuredInfoGrid.getChkNo(index)) {
|
|
tRow=1;
|
|
}
|
|
}
|
|
|
|
if (tRow==0) {
|
|
i18nAlert("请至少选择一条记录!", "LIS-03027");
|
|
return false;
|
|
}
|
|
|
|
mOperate="DELETE";
|
|
fm.action = "../API/grp_pa/g_pos/EdorVRSave/DELETE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
|
|
submitFunc();
|
|
}
|
|
|
|
//归属规则变更
|
|
function updatePosition(){
|
|
|
|
var rowNum = OldInsuredInfoGrid.mulLineCount ;
|
|
var tRow = 0;
|
|
|
|
for (var index=0;index<rowNum;index++) {
|
|
|
|
if (OldInsuredInfoGrid.getChkNo(index)) {
|
|
tRow=1;
|
|
}
|
|
}
|
|
|
|
if (tRow==0) {
|
|
i18nAlert("请至少选择一条记录!", "LIS-03027");
|
|
return false;
|
|
}
|
|
|
|
if(!verifyForm("fm")){
|
|
return false;
|
|
}
|
|
|
|
|
|
for (var i=0;i<rowNum;i++) {
|
|
|
|
if (OldInsuredInfoGrid.getChkNo(i)) {
|
|
|
|
var tOldPosition = OldInsuredInfoGrid.getRowColData(i, 13);
|
|
if (tOldPosition==fm.Position.value) {
|
|
|
|
i18nAlert("第{0}行被保险人归属规则未变更!", "LIS-03838", (i+1));
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
mOperate="UPDATE";
|
|
fm.action = "../API/grp_pa/g_pos/EdorVRSave/UPDATE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
|
|
submitFunc();
|
|
}
|
|
|
|
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();
|
|
// fm.submit();
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* 提交数据后返回操作
|
|
*/
|
|
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();
|
|
}
|
|
queryOldClick();
|
|
queryUpClick(2);
|
|
fm.EdorValDate.value='';
|
|
fm.Position.value='';
|
|
fm.PositionName.value='';
|
|
}
|
|
|
|
/**
|
|
* 查询归属规则
|
|
*/
|
|
function showPositionCode(cObj,cObjName){
|
|
return showCodeList('position',[cObj,cObjName],[0,1],null,tGrpContNo,'GrpContNo',1,null);
|
|
}
|
|
|
|
function showPositionCodeName(cObj,cObjName){
|
|
return showCodeListKey('position',[cObj,cObjName],[0,1],null,tGrpContNo,'GrpContNo',1,null);
|
|
}
|
|
|