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.
 
 
 
FZ/lis-module-grp-quotation-web/src/main/webapp/g_quot/LSQuotQueryOfferInput.js

145 lines
4.4 KiB

/***************************************************************
* <p>ProName:LSQuotQueryOfferInput.js</p>
* <p>Title:报价查询</p>
* <p>Description:报价查询</p>
* <p>Copyright:Copyright (c) 2012</p>
* <p>Company:Sinosoft</p>
* @author : 张成
* @version : 8.0
* @date : 2014-11-19
****************************************************************/
var showInfo;
var turnPage = new turnPageClass();
var turnPage1 = new turnPageClass();
var turnPage2 = new turnPageClass();
var tSQLInfo = new SqlClass();
/**
* 查询报价信息
*/
function queryQuotInfo() {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_quot.LSQuotQueryOfferSql");
tSQLInfo.setSqlId("LSQuotPrintSql1");
tSQLInfo.addSubPara(fm.NameBJ.value);
tSQLInfo.addSubPara(fm.QuotNoBJ.value);
tSQLInfo.addSubPara(fm.QuotTypeBJ.value);
tSQLInfo.addSubPara(fm.State.value);
tSQLInfo.addSubPara(fm.OfferListNo.value);
tSQLInfo.addSubPara(tManageCom);
tSQLInfo.setModule("grp_quotation");
initOfferListGrid();
turnPage1.queryModal(tSQLInfo.getString(), OfferListGrid, 2, 1);
if (!turnPage1.strQueryResult) {
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
}
}
/**
* 报价单下载
*/
function downloadQuot(parm1) {
var tRow = OfferListGrid.getSelNo();
//var tOfferListNo = document.all(parm1).all("OfferListGrid1").value;
//var tPrintState = document.all(parm1).all("OfferListGrid8").value;
var tPrintState = $("#"+parm1).find("input[name=OfferListGrid8]").val();
if (tPrintState=="0"){
return false;
} else {
// var tFileName = document.all(parm1).all("OfferListGrid11").value;
var tFileName = $("#"+parm1).find("input[name=OfferListGrid11]").val();
// var tFilePath = document.all(parm1).all("OfferListGrid12").value;
var tFilePath = $("#"+parm1).find("input[name=OfferListGrid12]").val();
// window.location = "../common/jsp/download.jsp?FilePath="+tFilePath+"&FileName="+tFileName;
downloadFile(tFilePath,tFileName,"../API/grp_common/jsp/download/DOWNLOAD");
}
}
/**
* 报价单下载
*/
function downloadAppnt(parm1){
var tGrpPropNo=$("#"+parm1).find("input[name=PropInfoGrid1]").val();
var tPrintState =$("#"+parm1).find("input[name=PropInfoGrid4]").val();
if (tPrintState=="1"){
var tFileName = tGrpPropNo+".pdf";
var tFilePath = $("#"+parm1).find("input[name=PropInfoGrid8]").val();
window.open("../API/grp_common/jsp/download/APIDOWNLOAD?FilePath=" + tFilePath + "&FileName=" + tFileName);
}
}
/**
* 报价信息查看
*/
function seeQuotation() {
var tRow = OfferListGrid.getSelNo();
if (tRow==0) {
i18nAlert("请先选择一条报价信息!", "LIS-01667");
return false;
}
var tOfferListNo = OfferListGrid.getRowColData(tRow-1,1);
var tQuotNo = OfferListGrid.getRowColData(tRow-1,2);
var tQuotBatNo = OfferListGrid.getRowColData(tRow-1,3);
var tQuotType = OfferListGrid.getRowColData(tRow-1,4);
var tSrc = "";
if (tQuotType == "00") {
tSrc = "./LSQuotETSeeQuotationInput.jsp";
} else if (tQuotType == "01") {
tSrc = "./LSQuotProjSeeQuotationInput.jsp";
}
tSrc += "?QuotNo="+ tQuotNo +"&QuotBatNo="+ tQuotBatNo +"&OfferListNo="+ tOfferListNo+"&QuotType="+tQuotType+"&QuotQuery=Y&ReturnFlag=1";
//location.href = tSrc;
window.open(tSrc,"报价信息查看",'width=2000,height=1000,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
//数据导出
function exportData() {
if (!i18nConfirm("确认要导出数据?", "LIS-00694")) {
return false;
}
//报表标题
var tTitle = "报价单号^|询价号^|批次号^|询价类型^|准客户名称/项目名称^|报价单状态";
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_quot.LSQuotQueryOfferSql");
tSQLInfo.setSqlId("LSQuotPrintSql3");
tSQLInfo.addSubPara(fm.NameBJ.value);
tSQLInfo.addSubPara(fm.QuotNoBJ.value);
tSQLInfo.addSubPara(fm.QuotTypeBJ.value);
tSQLInfo.addSubPara(fm.State.value);
tSQLInfo.addSubPara(fm.OfferListNo.value);
tSQLInfo.addSubPara(tManageCom);
tSQLInfo.setModule("grp_quotation");
var tQuerySQL = tSQLInfo.getString();
fm.action = "../API/grp_common/jsp/QueryDataExport/EXPORT";
ajaxSubmit2(document.getElementById("fm"),null,null,true, tTitle, tQuerySQL);
}
function resetClick(){
document.all("OfferListNo").value='';
document.all("QuotNoBJ").value='';
document.all("NameBJ").value='';
document.all("QuotTypeBJ").value='';
document.all("QuotTypeBJName").value='';
document.all("State").value='';
document.all("StateName").value='';
}