/*************************************************************** *

ProName:LLClaimNoticeDate.js

*

Title:拒付决定案件通知菜单

*

Description:拒付决定案件通知菜单

*

Copyright:Copyright (c) 2014

*

Company:Sinosoft

* @author : nsk * @version : 8.0 * @date : 2025-05-13 ****************************************************************/ var showInfo; var turnPage = new turnPageClass(); function queryGrid(){ initLLClaimQueryGrid(); if (!beforeSubmit()){ return false; } tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_claim"); tSQLInfo.setResourceName("g_claim.LLClaimNoticeDateSql"); tSQLInfo.setSqlId("LLClaimNoticeDateSql3"); tSQLInfo.addSubPara(fm.RptNo.value); tSQLInfo.addSubPara(fm.CustomerName.value); turnPage.queryModal(tSQLInfo.getString(),LLClaimQueryGrid); } function beforeSubmit(){ if ((fm.RptNo.value == ""||fm.RptNo.value == null) && (fm.CustomerName.value == "" || fm.CustomerName.value == null)){ i18nAlert("请录入赔案号或者出险人姓名!"); return false; } var tName = fm.CustomerName.value; if ((tName != "" && tName.length<2)){ i18nAlert("按出险人姓名查询至少需要输入两个汉字"); return false; } if (fm.RptNo.value != ""){ var tArr; if (fm.CustomerName.value == "" || fm.CustomerName.value == null){ tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_claim"); tSQLInfo.setResourceName("g_claim.LLClaimNoticeDateSql"); tSQLInfo.setSqlId("LLClaimNoticeDateSql1"); tSQLInfo.addSubPara(fm.RptNo.value); tArr = easyExecSql(tSQLInfo.getString()); }else { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_claim"); tSQLInfo.setResourceName("g_claim.LLClaimNoticeDateSql"); tSQLInfo.setSqlId("LLClaimNoticeDateSql2"); tSQLInfo.addSubPara(fm.RptNo.value); tSQLInfo.addSubPara(fm.CustomerName.value); tArr = easyExecSql(tSQLInfo.getString()); } if (tArr == null || tArr == ""){ i18nAlert("此菜单仅处理拒付案件!"); return false; } }else { tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_claim"); tSQLInfo.setResourceName("g_claim.LLClaimNoticeDateSql"); tSQLInfo.setSqlId("LLClaimNoticeDateSql2"); tSQLInfo.addSubPara(""); tSQLInfo.addSubPara(fm.CustomerName.value); var tArr = easyExecSql(tSQLInfo.getString()); if (tArr == null || tArr == ""){ i18nAlert("此菜单仅处理拒付案件"); return false; } } return true; } function submitFormUpload(){ var mClmno; var selno = LLClaimQueryGrid.getSelNo()-1; if (selno <0) { i18nAlert("请先选中一条数据!"); return false; } var i = LLClaimQueryGrid.getSelNo(); if (i != '0') { i = i - 1; mClmno= LLClaimQueryGrid.getRowColData(i,2); } var tFileName = fm.all('UploadPath').value; if (!checkUpFile(tFileName)) { return false; } var tExtenName = ""; if (tFileName.indexOf("\\")>0) { tFileName = tFileName.substring(tFileName.lastIndexOf("\\")+1); } if (tFileName.indexOf("/")>0 ) { tFileName = tFileName.substring(tFileName.lastIndexOf("/")+1); } if (tFileName == ""){ i18nAlert("请上传文件") } fm.OtherNoType.value = "G_CM"; fm.OtherNo.value = mClmno fm.Operator.value = "INSERT"; fm.action = "../API/grp_claim/g_claim/LLClaimNoticeDateSave/INSERT"; submitForm(); } function checkUpFile(cFileName) { if (cFileName == "" || cFileName == null) { i18nAlert("请选择要上传的文件!", "LIS-05576"); return false; } //检查文件类型是否符合 var tFilePath = cFileName; var tFileName = tFilePath.substring(tFilePath.lastIndexOf("\\") + 1); var tFileSuffix = tFilePath.substring(tFilePath.lastIndexOf(".")); if (tFileSuffix == ".doc" || tFileSuffix == ".DOC" || tFileSuffix == ".docx" || tFileSuffix == ".DOCX" || tFileSuffix == ".txt" || tFileSuffix == ".TXT" || tFileSuffix == ".xls" || tFileSuffix == ".XLS" || tFileSuffix == ".xlsx" || tFileSuffix == ".XLSX" || tFileSuffix == ".pdf" || tFileSuffix == ".PDF" || tFileSuffix == ".zip" || tFileSuffix == ".ZIP" || tFileSuffix == ".rar" || tFileSuffix == ".RAR") { } else { i18nAlert("不支持此文件类型上传!", "LIS-04691"); return false; } return true; } function LLClaimQueryGridClick() { var selno = LLClaimQueryGrid.getSelNo()-1; if (selno <0) { i18nAlert("请先选中一条数据!"); return; } var i = LLClaimQueryGrid.getSelNo(); if (i != '0') { i = i - 1; var tClmno= LLClaimQueryGrid.getRowColData(i,2); } } function Done(){ var mClmno; var selno = LLClaimQueryGrid.getSelNo()-1; if (selno <0) { i18nAlert("请先选中一条数据!"); return; } var i = LLClaimQueryGrid.getSelNo(); if (i != '0') { i = i - 1; mClmno= LLClaimQueryGrid.getRowColData(i,2); } tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_claim"); tSQLInfo.setResourceName("g_claim.LLClaimNoticeDateSql"); tSQLInfo.setSqlId("LLClaimNoticeDateSql4"); tSQLInfo.addSubPara(mClmno); var arr = easyExecSql(tSQLInfo.getString()) if (arr == null){ i18nAlert("请上传寄送凭证照片"); return false; } if (fm.DRStartDate.value == "" || fm.DRStartDate.value == null){ i18nAlert("请录入凭证寄出日期"); return false; } if (fm.DRStartDate.value.length != 10){ i18nAlert("日期格式为YYYY-MM-DD"); return false; } fm.Operator.value = "UPDATE" fm.OtherNoType.value = "G_CM"; fm.OtherNo.value = mClmno; fm.action = "../API/grp_claim/g_claim/LLClaimNoticeDateSave/UPDATE"; submitForm(); } /** * 提交 */ function submitForm() { var i = 0; var showStr = i18nMessage("正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04525"); var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr); 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"),afterSubmit,true); } /** * 提交后操作,服务器数据返回后执行的操作 */ function afterSubmit(FlagStr, content) { 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); showInfo.focus(); } //fm.AttachType.value = ""; //fm.AttachTypeName.value = ""; // fm.all('UploadPath').outerHTML = fm.all('UploadPath').outerHTML; }