/*************************************************************** *
ProName:LCPolSendBackInput.js
*Title:回执回销
*Description:回执回销
*Copyright:Copyright (c) 2012
*Company:Sinosoft
* @author : 蔡云聪 * @version : 8.0 * @date : 2014-05-07 ****************************************************************/ var tSQLInfo = new SqlClass(); var mOperate = ''; var turnPage = new turnPageClass(); var turnPage1 = new turnPageClass(); var showInfo; var tSQLInfo = new SqlClass(); var arrPicName= new Array(); var pic_place = 0; var s_img =0; var b_img = 0; var w = 0; var baseUrl = "../API/easyscan_common/EasyScanQuery/LisImageShow/DOWNLOAD?img_url="; //查询保单 function queryClick(){ if(!beforeCheck()){ return false; } var mManageCom=fm.ManageCom.value; var mGrpPropNo=fm.GrpPropNo.value; var mGrpContNo=fm.GrpContNo.value; var mGrpName=fm.GrpName.value; var mExpressStartDate=fm.ExpressStartDate.value; var mExpressEndDate=fm.ExpressEndDate.value; if(mManageCom == null || mManageCom == ''){ alert("请输入查询机构"); return false; } tSQLInfo = new SqlClass(); tSQLInfo.setModule("grp_nb"); tSQLInfo.setResourceName("g_app.LCPolSendBackSql"); tSQLInfo.setSqlId("LCPolSendBackSql1"); tSQLInfo.addSubPara(tManageCom); tSQLInfo.addSubPara(mManageCom); tSQLInfo.addSubPara(mGrpPropNo); tSQLInfo.addSubPara(mGrpContNo); tSQLInfo.addSubPara(mGrpName); tSQLInfo.addSubPara(mExpressStartDate); tSQLInfo.addSubPara(mExpressEndDate); tSQLInfo.addSubPara(tOperator); turnPage1.queryModal(tSQLInfo.getString(), ContInfoGrid, 1, 1); if(!turnPage1.strQueryResult){ i18nAlert("未查到符合条件的结果!", "LIS-01517"); initContInfoGrid(); } } /** * 保存录入结论信息 */ function saveClick(){ if(!beforeSub()){ return false; } var tRow = ContInfoGrid.getSelNo(); if (tRow==0) { i18nAlert("请选择一条信息!", "LIS-03743"); return false; } var GrpContNo = ContInfoGrid.getRowColData(tRow-1,3); var BussType = 'G_NB'; var SubType = 'UQ003' tSQLInfo = new SqlClass(); tSQLInfo.setModule("easyscan_common"); tSQLInfo.setResourceName("image.ImageQueryGrpSql"); tSQLInfo.setSqlId("ScanPagesQuerySql4"); tSQLInfo.addSubPara(GrpContNo); arrPicName = easyExecSql(tSQLInfo.getString()); if(arrPicName==null || arrPicName[0][0] == 0) { alert("请先打印保单"); return false; } tSQLInfo = new SqlClass(); tSQLInfo.setModule("easyscan_common"); tSQLInfo.setResourceName("image.ImageQueryGrpSql"); tSQLInfo.setSqlId("ScanPagesQuerySql3"); tSQLInfo.addSubPara(GrpContNo); tSQLInfo.addSubPara(BussType); tSQLInfo.addSubPara(SubType); arrPicName = easyExecSql(tSQLInfo.getString()); if(arrPicName==null || arrPicName=="") { alert("请先上传影像件"); return false; } var tSelNo = ContInfoGrid.getSelNo()-1; var GrpPolNum = ContInfoGrid.getRowColData(tSelNo, 3); var ClientReceiptDate = fm.ClientReceiptDate.value; if (ClientReceiptDate.length == '8'){ var year = ClientReceiptDate.substr(0, 4); var month = ClientReceiptDate.substr(4, 2); var day = ClientReceiptDate.substr(6, 2); ClientReceiptDate= year + "-" + month + "-" + day; } /*fm.action = "./LCPolSendBackSave.jsp?Operate=INSERT";*/ fm.action = "../API/grp_nb/g_app/LCPolSendBackSave/UPDATE?Operate=INSERT"+"&GrpPolNum="+GrpPolNum+"&ClientReceiptDate="+ClientReceiptDate+"&PolIssueDate="+PolIssueDate; submitForm(fm,"INSERT"); document.getElementById("ClientReceiptDate").value = ''; } 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(); queryClick(); } } function submitForm(obj, tOperate) { submitFunc(); mOperate = tOperate; /*obj.submit(); //提交*/ ajaxSubmit2(obj); } function beforeSub(){ var tSelNo = ContInfoGrid.getSelNo(); if (tSelNo<1) { i18nAlert("请选中一条投保信息", "LIS-01940"); return false; } var tDate = document.getElementById("ClientReceiptDate").value // if(!isDateFormat(tDate)) { // i18nAlert("客户签收日期录入格式错误,参考[2000-08-08]!", ""); // return false; // } if(fm.ClientReceiptDate.value==null || fm.ClientReceiptDate.value ==''){ alert("客户签收日期不能为空!") return false; } if(tDate == null || tDate == ''){ return false; } if (tDate.length == '8'){ var year = tDate.substr(0, 4); var month = tDate.substr(4, 2); var day = tDate.substr(6, 2); tDate= year + "-" + month + "-" + day; } if (!isDateFormat(tDate)) { i18nAlert("保单第{0}行客户签收日期录入格式错误,参考[2000-08-08]!", "LIS-01538", (i + 1)); return false; } if(tDate>tCurrentDate){ i18nAlert("客户签收日期不能晚于当前日期!", "LIS-01540"); return false; } PolIssueDate = ContInfoGrid.getRowColData(tSelNo-1,7); if(tDate