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.
 
 
 

291 lines
12 KiB

/***************************************************************
* <p>ProName:EdorATInput.js</p>
* <p>Title: 账户部分退保</p>
* <p>Description:账户部分退保</p>
* <p>Copyright:Copyright (c) 2012</p>
* <p>Company:Sinosoft</p>
* @author :
* @version :
* @date :
****************************************************************/
var turnPage = new turnPageClass(); //使用翻页功能,必须建立为全局变量
var tSQLInfo = new SqlClass();
var showInfo;
/**
* 查询团体客户信息
*/
function queryCustomerInfo()
{
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorATSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorATSql1");
tSQLInfo.addSubPara(tGrpContNo);
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (arrResult != null)
{
try
{
document.getElementsByName("CustomerNo")[0].value = arrResult[0][0];
document.getElementsByName("GrpName")[0].value = arrResult[0][1];
document.getElementsByName("ZipCode")[0].value = arrResult[0][2];
document.getElementsByName("PostalAddress")[0].value = arrResult[0][3];
document.getElementsByName("BusinessType")[0].value = arrResult[0][4];
document.getElementsByName("BusinessTypeName")[0].value = arrResult[0][5];
document.getElementsByName("GrpNature")[0].value = arrResult[0][6];
document.getElementsByName("GrpNatureName")[0].value = arrResult[0][7];
document.getElementsByName("Phone")[0].value = arrResult[0][9];
document.getElementsByName("Fax")[0].value = arrResult[0][10];
document.getElementsByName("Asset")[0].value = arrResult[0][11];
}
catch (ex) {}
}
arrResult=null;
tSQLInfo.setResourceName("g_pos.EdorATSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorATSql2");
tSQLInfo.addSubPara(tGrpContNo);
var arrResult = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (arrResult != null)
{
try
{
document.getElementsByName("Peoples2")[0].value = arrResult[0][0];
document.getElementsByName("CValiDate")[0].value = arrResult[0][1];
document.getElementsByName("Peoples")[0].value = arrResult[0][2];
}
catch (ex) {}
}
}
function returnbak() {
top.opener.initForm();
top.close();
}
// 页面初始化查询账户价值回调函数
function afterQuerySubmit(FlagStr,content,result)
{
if (typeof (showInfo) == "object" && typeof (showInfo) != "unknown") {
showInfo.close();
}
// alert("result.CValue="+result.CValue+"-"+result.CValueMax);
// alert("result.Rows="+result.Rows);
// alert(result.Rows[0]["PolNo"]);
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 {
document.all("CValue").value = result.CValue;
document.all("CValueMax").value = result.CValueMax;
const jsonArray = JSON.parse(result.Rows);
// alert(jsonArray[0]["PolNo"]);
// initPubAccInfoGrid();
PubAccInfoGrid.clearData();
for (var i = 0; i < jsonArray.length; i++){
const obj = jsonArray[i];
PubAccInfoGrid.addOne("PubAccInfoGrid");
PubAccInfoGrid.setRowColData(i, 1, obj["ContNo"]);
PubAccInfoGrid.setRowColData(i, 2, obj["Remark"]);
PubAccInfoGrid.setRowColData(i, 3, obj["PolNo"]);
PubAccInfoGrid.setRowColData(i, 4, obj["Prem"]);
PubAccInfoGrid.setRowColData(i, 5, obj["StandbyFlag1"]);
PubAccInfoGrid.setRowColData(i, 6, obj["StandbyFlag3"]);
PubAccInfoGrid.setRowColData(i, 7, obj["StandbyFlag2"]);
PubAccInfoGrid.setRowColData(i, 8, obj["OtherFeeRate"]);
PubAccInfoGrid.setRowColData(i, 10, obj["SumPrem"]);
}
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 initCValue()
{
document.all("CValue").value = 0.0;
document.all("queryFlag").value = 1;
mOperate="QUERY";
fm.action="../API/grp_pa/g_pos/EdorATSave/QUERY?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID+"&EdorNo="+tEdorNo;
submitFunc();
ajaxSubmit2(document.getElementById("fm"),afterQuerySubmit);
}
// 保存按钮
function minuAccAmnt()
{
if(!verifyForm("fm")){
return false;
}
divSpecMinuMoney.style.display = "none";
divMinuMoney.style.display = "none";
divPubAccInfoGrid.style.display = "";
var tCValue = document.all("CValue").value;
var tMinuMoney=0;
var lineCount1 = PubAccInfoGrid.mulLineCount;
var noMinuPol=0;//没有减保的账户
for ( var i = 0; i < lineCount1; i++) {
tCValue=PubAccInfoGrid.getRowColData(i, 4);
if (PubAccInfoGrid.getRowColData(i, 5) =="0") {
tMinuMoney=PubAccInfoGrid.getRowColData(i, 7);
document.all("MinuPercent").value = 100*parseFloat(tMinuMoney)/parseFloat(tCValue);
var tMinumRate = 100*parseFloat(tMinuMoney)/parseFloat(tCValue);
PubAccInfoGrid.setRowColData(i, 8, tMinumRate.toFixed(2));
}else if(PubAccInfoGrid.getRowColData(i, 5) =="1") {
var tMinuRate = PubAccInfoGrid.getRowColData(i, 8);
if(tMinuRate <=0 || tMinuRate >100)
{
alert("第"+i+1+"行 减保比例应在0~100之间!");
return;
}
tMinuMoney = parseFloat(tCValue)*parseFloat(tMinuRate) / 100;
PubAccInfoGrid.setRowColData(i, 7, tMinuMoney.toFixed(2));
}else{
noMinuPol=noMinuPol+1;
}
if(tMinuMoney-tCValue > 0)
{
alert("减保金额不能超过账户可退金额");
return;
}
if(noMinuPol==lineCount1)
{
// alert("请至少选择一个公共帐户减保!");
alert("请录入减保方式!");
return;
}
}
document.all("queryFlag").value = 0;
mOperate="SAVE";
fm.action="../API/grp_pa/g_pos/EdorATSave/SAVE?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 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 Edorquery()
{
try{
if (tActivityID === "1800401002") {
divEdorquery.style.display = "";
} else {
divEdorquery1.style.display = "";
}
}
catch(ex){divEdorquery1.style.display = "";}
}
function afterCodeSelect()
{
if(document.all("Mode").value == "0")
{
ModeMoney.style.display = "";
ModePercent.style.display = "none";
}
else if(document.all("Mode").value == "1")
{
ModePercent.style.display = "";
ModeMoney.style.display = "none";
}
}
function initHeathRiskCodeFlag()
{
// 新核心没有健康委托产品,直接处理页面显示
divSpecMinuMoney.style.display = "none";
divMinuMoney.style.display = "none";
divPubAccInfoGrid.style.display = "";
return false;
}
function queryClick()
{
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_pos.EdorATSql");
tSQLInfo.setModule("grp_pa");
tSQLInfo.setSqlId("EdorATSql4");
tSQLInfo.addSubPara(tGrpContNo);
turnPage.queryModal(tSQLInfo.getString(),InvestInfoGrid,1,0,10)
if(!turnPage.strQueryResult){
initInvestInfoGrid();
}
}