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.
333 lines
12 KiB
333 lines
12 KiB
/***************************************************************
|
|
* <p>ProName:LSQuotTrackInput.js</p>
|
|
* <p>Title:询价追踪查询页js</p>
|
|
* <p>Description:询价追踪查询页js</p>
|
|
* <p>Copyright:Copyright (c) 2024</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : 揣龙
|
|
* @version : 8.0
|
|
* @date : 2024-10-28
|
|
****************************************************************/
|
|
var showInfo;
|
|
var turnPage = new turnPageClass();
|
|
var turnPage1 = new turnPageClass();
|
|
var turnPage2 = new turnPageClass();
|
|
var tSQLInfo = new SqlClass();
|
|
var tSQLInfo1 = new SqlClass2();
|
|
|
|
/**
|
|
* 查询准客户名
|
|
*/
|
|
// function quryGrpSpec1() {
|
|
// //关联其他准客户时,查询询价申请机构
|
|
// tSQLInfo = new SqlClass();
|
|
// tSQLInfo.setResourceName("g_quot.LDSpecialAgreementSql");
|
|
// tSQLInfo.setSqlId("LDSpecialAgreementSql1");
|
|
// tSQLInfo.setModule("grp_quotation");
|
|
// initSpecialAgreementGrid();
|
|
// turnPage.queryModal(tSQLInfo.getString(),SpecialAgreementGrid,0,1);
|
|
// if (!turnPage.strQueryResult) {
|
|
// i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
// }
|
|
//
|
|
// }
|
|
|
|
function queryUpCustomer(customerno){
|
|
tPreSQLInfo = new SqlClass();
|
|
tPreSQLInfo.setResourceName("g_quot.LSQuotQueryCustomerSql");
|
|
tPreSQLInfo.setSqlId("LSQuotQueryCustomer4");
|
|
tPreSQLInfo.addSubPara(customerno);
|
|
tPreSQLInfo.setModule("grp_quotation");
|
|
|
|
var tmBasicArr = easyExecSql(tPreSQLInfo.getString(), 1, 0, 1);
|
|
var mprecustomerno =null;
|
|
if(tmBasicArr == null){
|
|
return "";
|
|
}else{
|
|
if ( tmBasicArr[0][0] ==null || tmBasicArr[0][0] =="" ) {
|
|
return "";
|
|
}else{
|
|
mprecustomerno =tmBasicArr[0][0];
|
|
}
|
|
}
|
|
|
|
|
|
return mprecustomerno+","+ queryUpCustomer(mprecustomerno);
|
|
}
|
|
/**
|
|
* 查询范围询价
|
|
*/
|
|
function quryGrpSpec1() {
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LSQuotSql");
|
|
tSQLInfo.setSqlId("LSQuotSql79");
|
|
tSQLInfo.addSubPara(tOperator);
|
|
tSQLInfo.addSubPara(tManageCom);
|
|
tSQLInfo.addSubPara(fm.QuotNo.value);
|
|
tSQLInfo.setModule("grp_quotation");
|
|
|
|
turnPage.queryModal(tSQLInfo.getString(), ScopeGrid, 2, 1);//第三位表示使用大数据量,2--大于200小于1000
|
|
if (!turnPage.strQueryResult) {
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 报价单明细
|
|
**/
|
|
function showQuotation(){
|
|
var tRow = ScopeGrid.getSelNo();
|
|
if (tRow==0) {
|
|
i18nAlert("请先选择一条报价信息!", "LIS-01667");
|
|
return false;
|
|
}
|
|
|
|
var tQuotNo = ScopeGrid.getRowColData(tRow-1,1);
|
|
var tQuotBatNo = "1"
|
|
var tQuotType = "01"
|
|
|
|
var tSrc = "";
|
|
tSrc += "?QuotNo="+ tQuotNo +"&QuotBatNo="+ tQuotBatNo+ "&QuotType="+ tQuotType+ "&ReturnFlag=1";
|
|
|
|
window.open("../g_app/LCQuotQueryMain.jsp"+tSrc,"报价单查询",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
}
|
|
/**
|
|
* 适用机构
|
|
**/
|
|
function showAppOrgCode(){
|
|
|
|
var tRow = ScopeGrid.getSelNo();
|
|
|
|
var QuotNo = ScopeGrid.getRowColData(tRow-1,1);
|
|
var QuotBatNo = "1"
|
|
//关联适用机构
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_quotation");
|
|
tSQLInfo.setResourceName("g_quot.LSQuotProjBasicSql");
|
|
tSQLInfo.setSqlId("LSQuotProjBasicSql3");
|
|
tSQLInfo.addSubPara(QuotNo);
|
|
tSQLInfo.addSubPara(QuotBatNo);
|
|
|
|
if (!noDiv(turnPage2, AppOrgCodeGrid, tSQLInfo.getString())) {
|
|
initAppOrgCodeGrid();
|
|
return false;
|
|
}
|
|
}
|
|
/**
|
|
* 返回用户清单信息
|
|
*/
|
|
function returnUserInfo() {
|
|
// var strUrl = "LSQuotQueryUserListMain.jsp";
|
|
// window.open(strUrl,"用户清单查询",'height=600,width=600,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
|
|
|
|
}
|
|
function returnAuthorizeInfo(){
|
|
tSQLInfo1.setResourceName("g_quot.LSQuotAuthorizeSql");
|
|
tSQLInfo1.setSqlId("LSQuotAuthorizeSql2");
|
|
tSQLInfo1.setModule("grp_quotation");
|
|
tSQLInfo1.addSubPara("para0",fm.AuthorName1.value);
|
|
tSQLInfo1.addSubPara("para1",fm.AuthorStartDate1.value);
|
|
tSQLInfo1.addSubPara("para2",fm.AuthorEndDate1.value);
|
|
initAuthorizeGrid();
|
|
turnPage.queryModal(tSQLInfo1.getString(), AuthorizeGrid, 0, 1);
|
|
if (!turnPage.strQueryResult) {
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
}
|
|
}
|
|
function selectEstimates(){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setResourceName("g_quot.LDSafetySupervisionConfigSql");
|
|
tSQLInfo.setSqlId("LDSafetySupervisionConfigSql1");
|
|
tSQLInfo.setModule("grp_quotation");
|
|
initSpecialAgreementGrid();
|
|
turnPage.queryModal(tSQLInfo.getString(), SpecialAgreementGrid, 0, 1);
|
|
if (!turnPage.strQueryResult) {
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
}
|
|
|
|
}
|
|
function basicSubmit(Operate) {
|
|
// if (!basicInfo()) {
|
|
// return false;
|
|
// }
|
|
// fm.action = "../API/grp_quotation/g_quot/LSQuotAuthorize/ADD?Operate="+Operate;
|
|
// submitForm(fm,true);
|
|
// initAuthorizeGrid();
|
|
}
|
|
|
|
function basicSubmit1() {
|
|
|
|
if(!checkAppCom()){
|
|
return false;
|
|
}
|
|
|
|
var rowNum=AppOrgCodeGrid. mulLineCount;
|
|
var tRow = ScopeGrid.getSelNo();
|
|
var Man = ScopeGrid.getRowColData(tRow-1,3);
|
|
var QuotNo = ScopeGrid.getRowColData(tRow-1,1);
|
|
var submit = false;
|
|
|
|
for (let i = 0; i <rowNum; i++) {
|
|
if(Man == AppOrgCodeGrid.getRowColData(i,1)){
|
|
submit = true;
|
|
}
|
|
}
|
|
|
|
if(submit == true){
|
|
fm.action = "../API/grp_quotation/g_quot/LSQuotQueryConfigSaveScope/SCOPE?Operate=SCOPE&QuotNo="+QuotNo;
|
|
submitForm(fm,false);
|
|
}else{
|
|
alert("不可删除当前询价默认机构")
|
|
}
|
|
}
|
|
|
|
function basicSubmit2() {
|
|
|
|
var tRow = AppOrgCodeGrid.getSelNo();
|
|
|
|
if (tRow==0) {
|
|
i18nAlert("请先选择一条报价信息!", "LIS-01667");
|
|
return false;
|
|
}
|
|
|
|
var tRow1 = ScopeGrid.getSelNo();
|
|
var Man = ScopeGrid.getRowColData(tRow1-1,3);
|
|
var QuotNo = ScopeGrid.getRowColData(tRow1-1,1);
|
|
var submit = false;
|
|
|
|
if(Man == AppOrgCodeGrid.getRowColData(tRow-1,1)){
|
|
submit = true;
|
|
}
|
|
|
|
if(!submit == true){
|
|
fm.action = "../API/grp_quotation/g_quot/LSQuotQueryConfigSaveScope/SCOPEDELETE?Operate=SCOPEDELETE&QuotNo="+QuotNo + "&ManageCom=" + AppOrgCodeGrid.getRowColData(tRow-1,1);
|
|
submitForm(fm,false);
|
|
}else{
|
|
alert("不可删除当前询价默认机构")
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 校验--适用机构
|
|
*/
|
|
function checkAppCom() {
|
|
|
|
AppOrgCodeGrid.delBlankLine();//删除空行
|
|
if(AppOrgCodeGrid.mulLineCount<=0) {
|
|
|
|
i18nAlert("适用机构不能为空!", "LIS-05005");
|
|
return false;
|
|
} else {
|
|
var vRow = AppOrgCodeGrid.mulLineCount;
|
|
for (var i = 0; i < vRow; i++) {
|
|
var mAppCom = AppOrgCodeGrid.getRowColData(i, 1);
|
|
for (var j = 0; j < i; j++) {
|
|
var nAppCom = AppOrgCodeGrid.getRowColData(j, 1);
|
|
if (mAppCom == nAppCom) {
|
|
i18nAlert("适用机构重复,请修改!", "LIS-05006");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
/**
|
|
* 提交数据
|
|
*/
|
|
function submitForm(obj, dynamic) {
|
|
|
|
var showStr = i18nMessage("正在处理数据,请您稍候并且不要修改屏幕上的值或链接其他页面!", "LIS-04535");
|
|
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");
|
|
//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; //获得窗口的水平位置
|
|
var 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();
|
|
// obj.submit();
|
|
if(dynamic != null && dynamic === true){
|
|
ajaxSubmit(obj);
|
|
} else {
|
|
ajaxSubmit2(obj);
|
|
}
|
|
}
|
|
|
|
function afterSubmit(FlagStr, content, cQuotNo, cQuotBatNo) {
|
|
|
|
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; //获得窗口的水平位置
|
|
var 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; //获得窗口的水平位置
|
|
var 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 noDiv(objPage, objGrid, tSql) {
|
|
|
|
//为兼容已允许的程序,容错而增加
|
|
objPage = new turnPageClass();
|
|
objPage.strQueryResult = easyQueryVer3(tSql, 1, 0, 1, 0, 1);
|
|
//判断是否查询成功
|
|
if (!objPage.strQueryResult) {
|
|
//清空MULTILINE,使用方法见MULTILINE使用说明
|
|
objGrid.clearData();
|
|
return false;
|
|
}
|
|
|
|
//清空数据容器,两个不同查询共用一个turnPage对象时必须使用,最好加上,容错
|
|
objPage.arrDataCacheSet = clearArrayElements(objPage.arrDataCacheSet);
|
|
//清空缓存
|
|
objPage.allArrDataCacheSet = clearArrayElements(objPage.allArrDataCacheSet);
|
|
objPage.allCacheSize = 0;
|
|
//查询成功则拆分字符串,返回二维数组
|
|
objPage.arrDataCacheSet = decodeEasyQueryResult(objPage.strQueryResult, 0, 0, objPage);
|
|
objPage.pageLineNum = objPage.queryAllRecordCount;
|
|
var tKey = 1;
|
|
//cTurnPage.allCacheSize ++;
|
|
objPage.allArrDataCacheSet[objPage.allCacheSize%objPage.allArrCacheSize] = {id:tKey,value:objPage.arrDataCacheSet};
|
|
//设置初始化过的MULTILINE对象,VarGrid为在初始化页中定义的全局变量
|
|
objPage.pageDisplayGrid = objGrid;
|
|
//保存SQL语句
|
|
objPage.strQuerySql = tSql;
|
|
//设置查询起始位置
|
|
objPage.pageIndex = 0;
|
|
//在查询结果数组中取出符合页面显示大小设置的数组
|
|
var arrDataSet = objPage.getData(objPage.arrDataCacheSet, objPage.pageIndex, objPage.pageLineNum);
|
|
//调用MULTILINE对象显示查询结果
|
|
displayMultiline(arrDataSet, objPage.pageDisplayGrid, objPage);
|
|
if (objPage.showTurnPageDiv==1) {
|
|
try {
|
|
objGrid.setPageMark(objPage);
|
|
} catch(ex){}
|
|
}
|
|
|
|
return true;
|
|
} |