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.
245 lines
7.9 KiB
245 lines
7.9 KiB
/***************************************************************
|
|
* <p>ProName:LCProposalSelectPlan.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 showInfo;
|
|
var turnPage = new turnPageClass();//系统使用
|
|
var turnPage1 = new turnPageClass();
|
|
var turnPage2 = new turnPageClass();
|
|
var turnPage3 = new turnPageClass();
|
|
var mOperate = "";//操作状态
|
|
var tSQLInfo = new SqlClass();
|
|
|
|
/**
|
|
* 查询不允许的方案组合
|
|
*/
|
|
function queryNoPlanCombi() {
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSelectPlanSql");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setSqlId("LSQuotSelectPlanSql1");
|
|
tSQLInfo.addSubPara(tQuotNo);
|
|
tSQLInfo.addSubPara("1");//批次号都是 1
|
|
|
|
turnPage1.queryModal(tSQLInfo.getString(), NoPlanCombiGrid, 1, 1);
|
|
}
|
|
|
|
/**
|
|
* 询价方案
|
|
*/
|
|
function queryQuotPlan() {
|
|
|
|
if (tTranProdType == "00" && tQuotType=='00') {//普通
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSql");
|
|
tSQLInfo.setSqlId("LSQuotSql14");
|
|
tSQLInfo.addSubPara(tQuotNo);
|
|
tSQLInfo.addSubPara("1");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
turnPage2.queryModal(tSQLInfo.getString(), QuotPlanGrid, 2, 1);
|
|
} else if (tTranProdType == "01") {//建工
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSql");
|
|
tSQLInfo.setSqlId("LSQuotSql61");
|
|
tSQLInfo.addSubPara(tQuotNo);
|
|
tSQLInfo.addSubPara("1");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
turnPage2.queryModal(tSQLInfo.getString(), QuotPlanGrid, 2, 1);
|
|
}else if(tTranProdType == "00" && tQuotType=='01'){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSql");
|
|
tSQLInfo.setSqlId("LSQuotSql301");
|
|
tSQLInfo.addSubPara(tQuotNo);
|
|
tSQLInfo.addSubPara("1");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
|
|
turnPage2.queryModal(tSQLInfo.getString(), QuotPlanGrid, 2, 1);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 报价方案
|
|
*/
|
|
function queryBJPlan() {
|
|
if (tTranProdType == "00" && tQuotType=='00') {//普通
|
|
|
|
tSQLInfo = new SqlClass();
|
|
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setResourceName("g_quot.LSQuotPrintSql");
|
|
tSQLInfo.setSqlId("LSQuotPrintSql15");
|
|
tSQLInfo.addSubPara(tOfferListNo);
|
|
turnPage3.queryModal(tSQLInfo.getString(), BJQuotPlanGrid, 2, 1);
|
|
} else if (tTranProdType == "01") {//建工
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setResourceName("g_quot.LSQuotPrintSql");
|
|
tSQLInfo.setSqlId("LSQuotPrintSql16");
|
|
tSQLInfo.addSubPara(tOfferListNo);
|
|
turnPage3.queryModal(tSQLInfo.getString(), BJQuotPlanGrid, 2, 1);
|
|
}else if(tTranProdType == "00" && tQuotType=='01'){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setResourceName("g_quot.LSQuotPrintSql");
|
|
tSQLInfo.setSqlId("LSQuotPrintSql17");
|
|
tSQLInfo.addSubPara(tOfferListNo);
|
|
|
|
turnPage3.queryModal(tSQLInfo.getString(), BJQuotPlanGrid, 2, 1);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* 选择
|
|
*/
|
|
function selectClick() {
|
|
|
|
var chkNum=0;
|
|
|
|
for ( var i=0;i<QuotPlanGrid.mulLineCount; i++ ) {
|
|
if( QuotPlanGrid.getChkNo(i)) {
|
|
chkNum++;
|
|
}
|
|
}
|
|
if(chkNum==0) {
|
|
i18nAlert("请选择询价方案信息!", "LIS-04255");
|
|
return false;
|
|
}
|
|
|
|
//校验建工险时,只可选择一个方案
|
|
if (tTranProdType=="01") {
|
|
|
|
if (chkNum>1) {
|
|
i18nAlert("建工险只可以选择一个方案!", "LIS-04256");
|
|
return false;
|
|
}
|
|
|
|
|
|
}
|
|
mOperate = "INSERT";
|
|
document.all("Operate").value = mOperate;
|
|
/*fm.action = "./LSQuotSelectPlanSave.jsp?QuotNo="+tQuotNo+"&QuotBatNo="+tQuotBatNo+"&OfferListNo="+ tOfferListNo +"&QuotType="+ tQuotType +"&TranProdType="+ tTranProdType;*/
|
|
fm.action = "../API/grp_quotation/g_quot/LSQuotSelectPlanSave/INSERT?QuotNo="+tQuotNo+"&OfferListNo="+ tOfferListNo +"&QuotType="+ tQuotType +"&ContPlanType="+ tTranProdType+"&Operate="+mOperate+"&QuotBatNo=1";
|
|
submitForm();
|
|
}
|
|
|
|
/**
|
|
* 删除
|
|
*/
|
|
function deleteClick() {
|
|
|
|
//判断是否选中了方案编码
|
|
var chkFlag=false;
|
|
for ( var i=0;i<BJQuotPlanGrid.mulLineCount; i++ ) {
|
|
|
|
if( BJQuotPlanGrid.getChkNo(i)) {
|
|
chkFlag = true;
|
|
break;
|
|
}
|
|
}
|
|
if(!chkFlag) {
|
|
i18nAlert("请选择报价所选方案信息!", "LIS-04259");
|
|
return false;
|
|
}
|
|
|
|
mOperate = "DELETE";
|
|
document.all("Operate").value = mOperate;
|
|
/*fm.action = "./LSQuotSelectPlanSave.jsp?QuotNo="+tQuotNo+"&QuotBatNo="+tQuotBatNo+"&OfferListNo="+ tOfferListNo+"&QuotType="+ tQuotType +"&TranProdType="+ tTranProdType;*/
|
|
fm.action = "../API/grp_quotation/g_quot/LSQuotSelectPlanSave/DELETE?QuotNo="+tQuotNo+"&OfferListNo="+ tOfferListNo +"&QuotType="+ tQuotType +"&ContPlanType="+ tTranProdType+"&Operate="+mOperate;
|
|
submitForm();
|
|
}
|
|
|
|
|
|
/**
|
|
* 提交
|
|
*/
|
|
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();
|
|
/*fm.submit();*/
|
|
ajaxSubmit(document.getElementById("fm"));
|
|
}
|
|
|
|
/**
|
|
* 提交后操作,服务器数据返回后执行的操作
|
|
*/
|
|
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();
|
|
//QuotPlanGrid.checkBoxAllNot();//清空所有勾选
|
|
queryQuotPlan();
|
|
queryBJPlan();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 获取该报价单打印状态
|
|
*/
|
|
function getPrintState() {
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSelectPlanSql");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setSqlId("LSQuotSelectPlanSql8");
|
|
tSQLInfo.addSubPara(tOfferListNo);
|
|
|
|
var tStateArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
|
|
if (tStateArr!=null) {
|
|
return tStateArr[0][0];
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|