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.
 
 
 
FZ/lis-module-grp-print-web/src/main/webapp/g_claim/LLPRBDealORFactPay.js

120 lines
4.7 KiB

var showInfo;
var turnPage1 = new turnPageClass();
var mOperate = "";//操作状态
function showList(){
// tSQLInfo = new SqlClass();
// tSQLInfo.setModule("grp_claim");
// tSQLInfo.setResourceName("g_claim.LLPRBDealORFactPaySql");
// tSQLInfo.setSqlId("LLPRBDealORFactPaySql0");
// tSQLInfo.addSubPara(fm.ManageCom.value);
// tSQLInfo.addSubPara(fm.PubFlag.value);
// var tQuerySQL = tSQLInfo.getString();
//alert(tQuerySQL);
if(beforeCheck()==false){return;}
mOperate = "PRINT";
submitForm();
}
function beforeCheck()
{
if(fm.ManageCom.value=="" || fm.ManageCom.value==null)
{
alert("请选择或输入统计机构!");
return false;
}
if(fm.PRBType.value=="" || fm.PRBType.value==null)
{
alert("请选择或输入清单类型!");
return false;
}
//如果是统计"实付清单",则实付起期和实付止期都不能为空
if(fm.PRBType.value=="1")
{
if(fm.FStartDate.value=="" || fm.FStartDate.value==null)
{
alert("请选择或输入实付起期!");
return false;
}
if(fm.FEndDate.value=="" || fm.FEndDate.value==null)
{
alert("请选择或输入实付止期!");
return false;
}
}
//如果是统计"应付未付清单/应付清单",则应付起期/应付止期都不能为空
if(fm.PRBType.value=="2" || fm.PRBType.value=="3")
{
if(fm.DStartDate.value=="" || fm.DStartDate.value==null)
{
alert("请选择或输入应付起期!");
return false;
}
if(fm.DEndDate.value=="" || fm.DEndDate.value==null)
{
alert("请选择或输入应付止期!");
return false;
}
}
}
/**
* 提交,保存按钮对应操作
*/
function submitForm() {
var i = 0;
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();
ajaxSubmit2(document.getElementById("fm"),resultAfterSubmit, null, true);
showInfo.close();
}
/**
* 提交后操作,服务器数据返回后执行的操作
*/
function afterSubmit(FlagStr,content,Filepath) {
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; //获得窗口的水平位置
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);
// var filepath1 =filepath+tfileName;
// window.location = "../API/grp_common/jsp/download/DOWNLOAD?FilePath="+filepath1+"&FileName="+tfileName;
showInfo.focus();
}
}
function resultAfterSubmit(FlagStr,Content,Result){//返回方法应有三个参数分别为(String,String,result)类型
afterSubmit(FlagStr,Content,Result.Path);
}