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.
497 lines
15 KiB
497 lines
15 KiB
/***************************************************************
|
|
* <p>ProName:LCPolSendBackInput.js</p>
|
|
* <p>Title:回执回销</p>
|
|
* <p>Description:回执回销</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @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<PolIssueDate){
|
|
i18nAlert("客户签收日期不得早于保单签单日期,请核实!", "LIS-99999");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function queryManage1() {
|
|
document.getElementById("ManageCom").value = tManageCom;
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_app.LCGrpApproveListSql");
|
|
tSQLInfo.setSqlId("LCGrpApproveListSql4");
|
|
tSQLInfo.addSubPara(tManageCom);
|
|
tSQLInfo.setModule("grp_nb");
|
|
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tArr != null) {
|
|
document.getElementById("EscanComName").value = tArr[0][0];
|
|
}
|
|
}
|
|
function beforeCheck(){
|
|
var tExpressStartDate=fm.ExpressStartDate.value;
|
|
var tExpressEndDate=fm.ExpressEndDate.value;
|
|
if(((tExpressStartDate!=null&&tExpressStartDate!='')&&(tExpressEndDate==null||tExpressEndDate==''))||((tExpressStartDate==null||tExpressStartDate=='')&&(tExpressEndDate!=null&&tExpressEndDate!=''))){
|
|
i18nAlert("递送登记起期和递送登记止期必须同时为空或者同时录入!", "LIS-01657");
|
|
return false;
|
|
}
|
|
if(tExpressStartDate>tExpressEndDate){
|
|
i18nAlert("递送登记起期应早于递送登记止期!", "LIS-01658");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
//查询影像图片,根据单证细类
|
|
|
|
function showPages() {
|
|
|
|
var tSelNo = ContInfoGrid.getSelNo();
|
|
if(tSelNo==0 || tSelNo==null) {
|
|
i18nAlert("请选择一行记录进行操作!", "LIS-01933");
|
|
}
|
|
|
|
var GrpContNo = ContInfoGrid.getRowColData(tSelNo-1,3);
|
|
var BussType = 'G_NB';
|
|
var SubType = 'UQ003'
|
|
|
|
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!="") {
|
|
|
|
fm.service.width = 1000;
|
|
if(w!=0){
|
|
fm.service.width = w;
|
|
}
|
|
|
|
fm.service.src = baseUrl + arrPicName[0][0];
|
|
// fm.all('divPages').filters.item(0).rotation = "0";
|
|
fm.all('divPages').filter.rotation = "0";
|
|
divPages.style.display = '';
|
|
divPages1.style.display = '';
|
|
w = fm.service.width;
|
|
document.getElementById('AllPage').innerHTML = arrPicName.length;
|
|
fm.all('page').value = 1;
|
|
pic_place = 0;
|
|
s_img =0;
|
|
b_img = 0;
|
|
|
|
}else{
|
|
fm.service.src = "";
|
|
fm.service.width= 0;
|
|
divPages.style.display = 'none';
|
|
divPages1.style.display = 'none';
|
|
i18nAlert("没有影像件", "LIS-01934");
|
|
}
|
|
}
|
|
|
|
function document_onkeydown(event){
|
|
var keycode = event.keyCode;
|
|
|
|
//判定是否按下小键盘END,旋转显示图片(Minim增加该方法)
|
|
if (keycode == "35") {
|
|
// var rotation = (fm.all('divPages').filters.item(0).rotation + 1) % 4;
|
|
// document.all('divPages').filters.item(0).rotation = rotation;
|
|
// var rotation = (fm.all('divPages').filter.rotation + 1) % 4;
|
|
// fm.all('divPages').filter.rotation = rotation;
|
|
ImgRotate("service", 1);
|
|
event.returnValue = false;
|
|
}
|
|
//判定是否按下PageUp
|
|
if (keycode == "33") {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
//循环图片队列
|
|
for (var i=arrPicName.length; i >= 0; i--){
|
|
//找到第一个满足条件的队列项
|
|
|
|
if (i < pic_place){
|
|
goToPic(i);
|
|
break;
|
|
}
|
|
}
|
|
event.returnValue = false;
|
|
}
|
|
//判定是否按下PageDown
|
|
if (keycode == "34") {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
for (var i=0; i < arrPicName.length; i++){
|
|
if (i > pic_place){
|
|
goToPic(i);
|
|
break;
|
|
}
|
|
}
|
|
event.returnValue = false;
|
|
}
|
|
|
|
//判定是否按下小键盘上的*
|
|
if ((keycode == "106")&&event.ctrlKey){
|
|
//还原图片的实际大小,并将放大和缩小次数置为0
|
|
// fm.service.width = w;
|
|
$("#service").width(w);
|
|
s_img = 0;
|
|
b_img = 0;
|
|
}
|
|
|
|
//判定是否按下小建盘的+,同时按住ctrl
|
|
if ((keycode == "107")&&(event.ctrlKey&&event.altKey)) {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
if (b_img <= 10){
|
|
//判定是否缩小过
|
|
|
|
if (s_img != 0){
|
|
// fm.service.width = w / (1 + 0.2 * (s_img - 1))
|
|
$("#service").width(w / (1 + 0.2 * (s_img - 1)));
|
|
s_img = s_img - 1;
|
|
}else{
|
|
b_img = b_img + 1;
|
|
// fm.service.width = w * (1 + 0.2 * b_img)
|
|
$("#service").width(w * (1 + 0.2 * b_img));
|
|
}
|
|
}
|
|
}
|
|
//判定是否按下小建盘的-,同时按住ctrl,不可改变到比原图还小
|
|
|
|
if ((keycode == "109")&&(event.ctrlKey&&event.altKey)) {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
if (b_img != -2){
|
|
// fm.service.width = w * (1 + 0.2 * (b_img - 1))
|
|
$("#service").width(w * (1 + 0.2 * (b_img - 1)));
|
|
b_img = b_img - 1;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function goToPic(index) {
|
|
|
|
if (index != pic_place) {
|
|
// fm.service.src = baseUrl + arrPicName[index];
|
|
var img = $("<img galleryImg=\"no\" border=\"0\" id=\"service\" src=\""+baseUrl + arrPicName[index]+"\">");
|
|
img.width(w);
|
|
$("#service").remove();
|
|
$("#divPages").append(img);
|
|
|
|
//top.fraPic.centerPic.innerHTML = top.fraPic.arrPicName[index];
|
|
//重新定位所选图片所在队列的位置
|
|
pic_place = index;
|
|
document.all('page').value = index+1;
|
|
}
|
|
}
|
|
|
|
function turnpage(){
|
|
|
|
var pageno = document.all('page').value;
|
|
pageno= pageno-1;
|
|
if(0 <= pageno && pageno < arrPicName.length){
|
|
goToPic(pageno);
|
|
}else{
|
|
i18nAlert("输入的页码超过页码范围", "LIS-01935");
|
|
}
|
|
}
|
|
function document_onkeydown1(event){
|
|
var keycode = event;
|
|
|
|
//判定是否按下小键盘END,旋转显示图片(Minim增加该方法)
|
|
if (keycode == "35") {
|
|
// var rotation = (fm.all('divPages').filters.item(0).rotation + 1) % 4;
|
|
// document.all('divPages').filters.item(0).rotation = rotation;
|
|
// var rotation = (fm.all('divPages').filter.rotation + 1) % 4;
|
|
// fm.all('divPages').filter.rotation = rotation;
|
|
ImgRotate("service", 1);
|
|
event.returnValue = false;
|
|
}
|
|
//判定是否按下PageUp
|
|
if (keycode == "33") {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
//循环图片队列
|
|
for (var i=arrPicName.length; i >= 0; i--){
|
|
//找到第一个满足条件的队列项
|
|
|
|
if (i < pic_place){
|
|
goToPic(i);
|
|
break;
|
|
}
|
|
}
|
|
event.returnValue = false;
|
|
}
|
|
//判定是否按下PageDown
|
|
if (keycode == "34") {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
for (var i=0; i < arrPicName.length; i++){
|
|
if (i > pic_place){
|
|
goToPic(i);
|
|
break;
|
|
}
|
|
}
|
|
event.returnValue = false;
|
|
}
|
|
|
|
//判定是否按下小键盘上的*
|
|
if ((keycode == "106")&&event.ctrlKey){
|
|
//还原图片的实际大小,并将放大和缩小次数置为0
|
|
// fm.service.width = w;
|
|
$("#service").width(w);
|
|
s_img = 0;
|
|
b_img = 0;
|
|
}
|
|
|
|
//判定是否按下小建盘的+,同时按住ctrl
|
|
if ((keycode == "107")&&(event.ctrlKey&&event.altKey)) {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
|
|
if (b_img <= 10){
|
|
//判定是否缩小过
|
|
|
|
if (s_img != 0){
|
|
// fm.service.width = w / (1 + 0.2 * (s_img - 1))
|
|
$("#service").width(w / (1 + 0.2 * (s_img - 1)));
|
|
s_img = s_img - 1;
|
|
}else{
|
|
b_img = b_img + 1;
|
|
// fm.service.width = w * (1 + 0.2 * b_img)
|
|
$("#service").width(w * (1 + 0.2 * b_img));
|
|
}
|
|
}
|
|
}
|
|
//判定是否按下小建盘的-,同时按住ctrl,不可改变到比原图还小
|
|
|
|
if ((keycode == "109")&&(event.ctrlKey&&event.altKey)) {
|
|
try { hiddenPosition(); } catch(e) {}
|
|
if (b_img != -2){
|
|
// fm.service.width = w * (1 + 0.2 * (b_img - 1))
|
|
$("#service").width(w * (1 + 0.2 * (b_img - 1)));
|
|
b_img = b_img - 1;
|
|
}
|
|
}
|
|
|
|
}
|
|
function ImgRotate(fieldId, i){
|
|
switch(i)
|
|
{
|
|
case 0:
|
|
$('#'+fieldId).rotate(0);
|
|
break;
|
|
case 1:
|
|
$('#'+fieldId).rotate(90);
|
|
break;
|
|
case 2:
|
|
$('#'+fieldId).rotate(180);
|
|
break;
|
|
case 3:
|
|
$('#'+fieldId).rotate(270);
|
|
break;
|
|
}
|
|
} |