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.
366 lines
13 KiB
366 lines
13 KiB
/***************************************************************
|
|
* <p>ProName:EdorCAInput.js</p>
|
|
* <p>Title: 账户金额转移</p>
|
|
* <p>Description:账户金额转移</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : zhoufz
|
|
* @version : 8.0
|
|
* @date : 2014-08-25
|
|
****************************************************************/
|
|
|
|
var showInfo;
|
|
var turnPage = new turnPageClass();
|
|
var turnPage1 = new turnPageClass();
|
|
var turnPage2 = new turnPageClass();
|
|
var turnPage3 = new turnPageClass();
|
|
var mOperate = "";//操作状态
|
|
var tSQLInfo = new SqlClass();
|
|
|
|
//原被保险人信息查询
|
|
function queryOldClick(){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorCASql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorCASql1");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(document.all("OldInsuredName").value);
|
|
tSQLInfo.addSubPara(document.all("OldInsuredIDNo").value);
|
|
tSQLInfo.addSubPara(document.all("OldInsuredNo").value);
|
|
tSQLInfo.addSubPara(tEdorAppNo);
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tCurrenDate);
|
|
|
|
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.EdorCASql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorCASql2");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorAppNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
tSQLInfo.addSubPara(NullToEmpty(tEdorNo));
|
|
tSQLInfo.addSubPara(document.all("InsuredName").value);
|
|
tSQLInfo.addSubPara(document.all("InsuredIDNo").value);
|
|
tSQLInfo.addSubPara(document.all("BatchNo").value);
|
|
|
|
turnPage2.queryModal(tSQLInfo.getString(), UpdateInsuredInfoGrid, 1, 1);
|
|
|
|
if(o=='1'){
|
|
if(!turnPage2.strQueryResult){
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03011");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
//团体专项医疗账户信息查询
|
|
function queryGroupAcc(){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorCASql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorCASql3");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tCurrenDate);
|
|
|
|
turnPage3.queryModal(tSQLInfo.getString(), GroupAccGrid, 1, 1);
|
|
}
|
|
|
|
|
|
//转移金额总和
|
|
function querysumMoney(){
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_pos.EdorCASql");
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setSqlId("EdorCASql4");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tEdorAppNo);
|
|
tSQLInfo.addSubPara(tEdorType);
|
|
tSQLInfo.addSubPara(NullToEmpty(tEdorNo));
|
|
|
|
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tPropEntry == null) {
|
|
return false;
|
|
} else {
|
|
document.all("MinuMoney").value = tPropEntry[0][0];
|
|
}
|
|
}
|
|
|
|
//账户金额转移
|
|
function moveClick(){
|
|
|
|
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;
|
|
}
|
|
|
|
var tInAmountFlag = false;
|
|
var tOutAmountFlag = false;
|
|
var tSumInAmount = 0;
|
|
for (var i=0;i < OldInsuredInfoGrid.mulLineCount;i++) {
|
|
|
|
if (OldInsuredInfoGrid.getChkNo(i)) {
|
|
|
|
var tInsuredType = OldInsuredInfoGrid.getRowColData(i,1);
|
|
var tInsuAccBala = OldInsuredInfoGrid.getRowColData(i,11);
|
|
var tInAmount = OldInsuredInfoGrid.getRowColData(i,12);
|
|
var tOutAmount = OldInsuredInfoGrid.getRowColData(i,13);
|
|
|
|
if ((tInAmount==null || tInAmount=="") && (tOutAmount==null || tOutAmount=="")) {
|
|
i18nAlert("第{0}行转入金额与转出金额不能同时为空!", "LIS-03178", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if ((tInAmount!=null && tInAmount!="") && (tOutAmount!=null && tOutAmount!="")) {
|
|
i18nAlert("第{0}行转入金额与转出金额不能同时录入!", "LIS-03179", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (tInAmount!=null && tInAmount!="") {
|
|
|
|
tInAmountFlag = true;
|
|
|
|
if (!isNumeric(tInAmount)) {
|
|
i18nAlert("第{0}行转入金额需要录入大于等于0的数字!", "LIS-03180", (i+1));
|
|
return false;
|
|
}
|
|
|
|
tSumInAmount = tSumInAmount + parseFloat(tInAmount);
|
|
}
|
|
|
|
if (tOutAmount!=null && tOutAmount!="") {
|
|
|
|
tOutAmountFlag = true;
|
|
|
|
if (!isNumeric(tOutAmount)) {
|
|
i18nAlert("第{0}行转出金额需要录入大于等于0的数字!", "LIS-03181", (i+1));
|
|
return false;
|
|
}
|
|
|
|
if (parseFloat(tOutAmount)>parseFloat(tInsuAccBala)) {
|
|
i18nAlert("第{0}行转出金额不能大于账户本息和!", "LIS-03182", (i+1));
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (tInAmountFlag && tOutAmountFlag) {
|
|
i18nAlert("转入金额与转出金额不能同时录入!", "LIS-03312");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (tInAmountFlag) {
|
|
|
|
var tCValue = document.all("CValue").value;
|
|
var tMinuMoney = document.all("MinuMoney").value;
|
|
|
|
var tCValueNum = parseFloat(tCValue);
|
|
if (isNaN(tCValueNum)) {
|
|
tCValueNum = 0;
|
|
}
|
|
|
|
var tMinuMoneyNum = parseFloat(tMinuMoney);
|
|
if (isNaN(tMinuMoneyNum)) {
|
|
tMinuMoneyNum = 0;
|
|
}
|
|
|
|
if (tSumInAmount > tCValueNum) {
|
|
i18nAlert("本次转入金额之和不能大于公共帐户价值!");
|
|
return false;
|
|
}
|
|
|
|
if ((tSumInAmount + tMinuMoneyNum) > tCValueNum) {
|
|
i18nAlert("转移金额总和不能大于公共帐户价值!");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (GroupAccGrid.mulLineCount>0) {
|
|
|
|
var tGroupName = GroupAccGrid.getRowColData(0,2);
|
|
var tGroupAcc = GroupAccGrid.getRowColData(0,5);
|
|
|
|
if (parseFloat(tSumInAmount)>parseFloat(tGroupAcc)) {
|
|
i18nAlert("转入金额之和大于{0}本息和!", "LIS-03313", tGroupName);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
mOperate="UPDATE";
|
|
document.getElementById("fm").action="../API/grp_pa/g_pos/EdorCASave/UPDATE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
|
|
submitFunc();
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
querysumMoney();
|
|
}
|
|
|
|
|
|
function initCValue()
|
|
{
|
|
|
|
fm.all("CValue").value = 0.0;
|
|
fm.all("queryFlag").value = 1;
|
|
fm.action="../API/grp_pa/g_pos/EdorRTSave/ADD?queryFlag=1&Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAcceptNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
|
|
submitFunc();
|
|
ajaxSubmit2(document.getElementById("fm"),afterSubmit);
|
|
showInfo.focus();
|
|
}
|
|
|
|
|
|
//撤销操作
|
|
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";
|
|
document.getElementById("fm").action="../API/grp_pa/g_pos/EdorCASave/DELETE?Operate="+ mOperate+"&EdorType="+tEdorType+"&EdorAppNo="+tEdorAppNo+"&GrpContNo="+tGrpContNo+"&MissionID="+tMissionID+"&SubMissionID="+tSubMissionID+"&ActivityID="+tActivityID;
|
|
submitFunc();
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
querysumMoney();
|
|
}
|
|
|
|
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(DealFlag, MsgContent,tCValue) {
|
|
try {
|
|
showInfo.close();
|
|
} catch (ex) {
|
|
}
|
|
if (fm.all("queryFlag").value == 1) {
|
|
fm.all("CValue").value = tCValue.CValue;
|
|
fm.all("queryFlag").value =0;
|
|
} else {
|
|
DealFlag = DealFlag.toLowerCase();
|
|
var MsgPageURL = "../common/jsp/MessagePage.jsp?picture=";
|
|
switch (DealFlag) {
|
|
case "fail":
|
|
MsgPageURL = MsgPageURL + "F&content=" + MsgContent;
|
|
// showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=250px");
|
|
var name = '提示'; //网页名称,可为空;
|
|
var iWidth = 550; //弹出窗口的宽度;
|
|
var iHeight = 350; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(MsgPageURL, 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();
|
|
break;
|
|
case "succ":
|
|
case "success":
|
|
MsgPageURL = MsgPageURL + "S&content=" + MsgContent;
|
|
// showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=350px");
|
|
var name = '提示'; //网页名称,可为空;
|
|
var iWidth = 550; //弹出窗口的宽度;
|
|
var iHeight = 350; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(MsgPageURL, 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();
|
|
break;
|
|
default:
|
|
MsgPageURL = MsgPageURL + "C&content=" + MsgContent;
|
|
// showInfo = showModalDialog(MsgPageURL, window, "status=0; help=0; close=0; dialogWidth=550px; dialogHeight=300px");
|
|
var name = '提示'; //网页名称,可为空;
|
|
var iWidth = 550; //弹出窗口的宽度;
|
|
var iHeight = 350; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(MsgPageURL, 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();
|
|
break;
|
|
}
|
|
}
|
|
queryOldClick();
|
|
queryUpClick(2);
|
|
}
|
|
|
|
|
|
/**
|
|
* 提交数据后返回操作
|
|
*/
|
|
// 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);
|
|
// }
|
|
|
|
|