/*************************************************************** *
ProName:LCInsuredUploadInput.js
*Title:人员清单导入
*Description:人员清单导入
*Copyright:Copyright (c) 2012
*Company:Sinosoft
* @author : zhoufz * @version : 8.0 * @date : 2014-05-27 ****************************************************************/ var showInfo; var turnPage = new turnPageClass();//系统使用 var turnPage1 = new turnPageClass(); var turnPage2 = new turnPageClass(); var tOperate = "";//操作状态 var tSQLInfo = new SqlClass(); /** * 批次信息查询 */ function queryBatchInfo() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_nb"); tSQLInfo.setResourceName("g_app.LCInsuredUploadSql"); tSQLInfo.setSqlId("LCInsuredUploadSql1"); tSQLInfo.addSubPara(tGrpPropNo); turnPage1.queryModal(tSQLInfo.getString(), BatchGrid,1,1); } /** * 批次明细信息查询 */ function queryDetailInfo() { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_nb"); tSQLInfo.setResourceName("g_app.LCInsuredUploadSql"); tSQLInfo.setSqlId("LCInsuredUploadSql2"); tSQLInfo.addSubPara(tGrpPropNo); tSQLInfo.addSubPara(fm.BatchNo.value); if (fm.State.value=="0") { tSQLInfo.addSubPara(""); tSQLInfo.addSubPara("1"); } else if (fm.State.value=="1") { tSQLInfo.addSubPara("1"); tSQLInfo.addSubPara(""); } else { tSQLInfo.addSubPara(""); tSQLInfo.addSubPara(""); } tSQLInfo.addSubPara(fm.InsuredName.value); tSQLInfo.addSubPara(fm.IDNo.value); turnPage2.queryModal(tSQLInfo.getString(), BatchDetailGrid,1,1); if (!turnPage2.strQueryResult) { i18nAlert("未查询到符合条件的查询结果!", "LIS-03016"); } } /** * 导入人员清单 */ function importClick() { var filePath = fmupload.UploadPath.value; if(filePath == null || filePath == ""){ i18nAlert("请选择导入文件路径!", "LIS-03339"); return false; } var indexFirst = filePath.lastIndexOf("\\"); var indexLast = filePath.lastIndexOf(".xlsx"); if(indexFirst < 0 || indexLast < 0 || indexLast <= indexFirst) { i18nAlert("文件路径不合法或选择的文件格式不正确,请重新选择!", "LIS-03340"); return false; } var i = 0; var showStr = i18nMessage("正在导入,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04817"); 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(); fmupload.action="../API/grp_nb/g_app/GrpHighRiskQuery/UPLOAD1?Operate=UPLOAD"; ajaxSubmit2(document.getElementById("fmupload"), afterClickLogon, true); top.opener.getHighmuline(); top.opener.queryClickHighCustomer(tSerialno); top.close(); } function afterClickLogon(flagStr,content,result){ tSerialno=result.SerialNo; afterSubmit(flagStr, content); } //提交,保存按钮对应操作 function submitForm() { var i = 0; var showStr=i18nMessage("正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04525"); var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr); //showInfo=window.open(urlStr,"newwindow","height=250;width=550;top=0;left= 0;toolbar=no;menubar=no;scrollbars=no; resizable=no;alwaysRaised:yes;"); 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(); showInfo.close(); //document.getElementById("fm").submit(); //提交 //存在动态变量,无法使用ajaxSubmit2 ajaxSubmit(document.getElementById("fmupload")); } /** * 提交数据后返回操作 */ 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; //获得窗口的水平位置 var 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; //获得窗口的水平位置 var 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 beforeSubmit() { //系统的校验方法 if (!verifyInput2()) { return false; } return true; }