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.
243 lines
9.3 KiB
243 lines
9.3 KiB
// 该文件中包含客户端需要处理的函数和事件
|
|
var mDebug = "0";
|
|
var mOperator = "";
|
|
var showInfo = null;
|
|
var turnPage = new turnPageClass();
|
|
var manageCom = "";
|
|
var bussType = "";
|
|
var hostName = "";
|
|
|
|
var submitForm = function(){
|
|
|
|
}
|
|
|
|
var showMessagePage = function(title, content, messagePicture, width, height) {
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=" + messagePicture + "&content=" + encodeURIComponent(content);
|
|
var name = title; //网页名称,可为空;
|
|
var iWidth = width; //弹出窗口的宽度;
|
|
var iHeight = height; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
var tmpShowInfo = 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);
|
|
tmpShowInfo.focus();
|
|
return tmpShowInfo;
|
|
}
|
|
|
|
var afterSubmit = function(flagStr, content, onsucc_name){
|
|
|
|
if(showInfo !== null && showInfo !== undefined)
|
|
showInfo.close();
|
|
|
|
if (flagStr == "Fail" )
|
|
{
|
|
// showInfo = showMessagePage("操作失败", content, "F", 550, 350);
|
|
showInfo = showMessagePage(i18nMessage("操作失败","LIS-18334"), content, "F", 550, 350);
|
|
}
|
|
else if(flagStr == "Succ")
|
|
{
|
|
// showInfo = showMessagePage("操作成功", content, "S", 550, 350);
|
|
showInfo = showMessagePage(i18nMessage("操作成功","LIS-06197"), content, "S", 550, 350);
|
|
if(onsucc_name !== null && onsucc_name !== undefined)
|
|
if(window[onsucc_name]){
|
|
window[onsucc_name]();
|
|
}
|
|
}
|
|
onQueryESComServerButtonClicked(null);
|
|
}
|
|
|
|
function on_succ_delete(){
|
|
onQueryESComServerButtonClicked(null);
|
|
}
|
|
|
|
function myOnFocus(e){
|
|
try{
|
|
if(showInfo && showInfo.focus) {
|
|
showInfo.focus();
|
|
}
|
|
}catch(ex){
|
|
showInfo = null;
|
|
}
|
|
}
|
|
|
|
function onQueryESComServerButtonClicked(e){
|
|
|
|
var ESComServerManageCom = document.getElementById("ESComServerManageComQueryInput");
|
|
var ESComServerBussType = document.getElementById("ESComServerBussTypeQueryInput");
|
|
var ESComServerHostName = document.getElementById("ESComServerHostNameQueryInput");
|
|
var manageCom = null;
|
|
var bussType = null;
|
|
var hostName = null;
|
|
if(ESComServerManageCom){
|
|
manageCom = ESComServerManageCom.value;
|
|
}
|
|
if(ESComServerBussType){
|
|
bussType = ESComServerBussType.value;
|
|
}
|
|
if(ESComServerHostName){
|
|
hostName = ESComServerHostName.value;
|
|
}
|
|
var mySql = new SqlClass();
|
|
mySql.setModule("easyscan");
|
|
mySql.setResourceName("config.ESComServerInputSql"); //指定使用的properties文件名
|
|
sqlId = "ESComServerInputSql1";
|
|
mySql.setSqlId(sqlId);//指定使用的Sql的id
|
|
mySql.addSubPara(manageCom);
|
|
mySql.addSubPara(bussType);
|
|
mySql.addSubPara(hostName);
|
|
var queryResult = mySql.getString();
|
|
turnPage.queryModal(queryResult, ESComServerGrid);
|
|
}
|
|
|
|
function onRefreshESComServerButtonClicked(e){
|
|
|
|
initTextBoxes();
|
|
initESComServerGrid();
|
|
var tSelNo = ESComServerGrid.getSelNo();
|
|
|
|
if (tSelNo != -1) {
|
|
hostName = "";
|
|
manageCom = "";
|
|
bussType = "";
|
|
try{
|
|
manageCom = ESComServerGrid.getRowColData(tSelNo - 1, 1);
|
|
bussType = ESComServerGrid.getRowColData(tSelNo - 1, 2);
|
|
hostName = ESComServerGrid.getRowColData(tSelNo - 1, 3);
|
|
}catch(ex){
|
|
|
|
}
|
|
var ManageComInput = document.getElementById("ManageComInput");
|
|
var BussTypeInput = document.getElementById("BussTypeInput");
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
ManageComInput.value = manageCom;
|
|
BussTypeInput.value = bussType;
|
|
HostNameInput.value = hostName;
|
|
}
|
|
}
|
|
|
|
function onAddButtonClicked(e){
|
|
var tSelNo = ESComServerGrid.getSelNo();
|
|
if(tSelNo != 0){
|
|
// alert("不需要选择数据,请重新查询后直接添加!")
|
|
i18nAlert("不需要选择数据,请重新查询后直接添加!", "LIS-20104");
|
|
return;
|
|
}
|
|
if (tSelNo != -1) {
|
|
manageCom = "";
|
|
bussType = "";
|
|
hostName = "";
|
|
try{
|
|
manageCom = ESComServerGrid.getRowColData(tSelNo - 1, 1);
|
|
bussType = ESComServerGrid.getRowColData(tSelNo - 1, 2);
|
|
hostName = ESComServerGrid.getRowColData(tSelNo - 1, 3);
|
|
}catch(ex){
|
|
|
|
}
|
|
var ManageComInput = document.getElementById("ManageComInput");
|
|
var BussTypeInput = document.getElementById("BussTypeInput");
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
}
|
|
var urlStr = "./ESComServerMain.jsp?ac=189&mc=" + manageCom + "&bt=" + bussType + "&hn=" + hostName;
|
|
// var name = '提示'; //网页名称,可为空;
|
|
var name = i18nMessage('提示',"laydate-tips"); //网页名称,可为空;
|
|
var iWidth = 1024; //弹出窗口的宽度;
|
|
var iHeight = 1024; //弹出窗口的高度;
|
|
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,scrollbars=yes,location=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
document.getElementById("fmActionInput").value="INSERT";
|
|
showInfo.focus();
|
|
}
|
|
|
|
function onEditButtonClicked(e){
|
|
|
|
if(hostName == "" || manageCom == "" || bussType == "") {
|
|
// afterSubmit("Fail", "您未选择任何的机构对象.", null);
|
|
afterSubmit("Fail", i18nMessage("您未选择任何的机构对象.","LIS-20105"), null);
|
|
|
|
return;
|
|
}
|
|
var tSelNo = ESComServerGrid.getSelNo();
|
|
|
|
if (tSelNo != -1) {
|
|
manageCom = "";
|
|
bussType = "";
|
|
hostName = "";
|
|
try{
|
|
manageCom = ESComServerGrid.getRowColData(tSelNo - 1, 1);
|
|
bussType = ESComServerGrid.getRowColData(tSelNo - 1, 2);
|
|
hostName = ESComServerGrid.getRowColData(tSelNo - 1, 3);
|
|
}catch(ex){
|
|
|
|
}
|
|
var ManageComInput = document.getElementById("ManageComInput");
|
|
var BussTypeInput = document.getElementById("BussTypeInput");
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
}
|
|
var urlStr = "./ESComServerMain.jsp?ac=392&mc=" + manageCom + "&bt=" + bussType + "&hn=" + hostName;
|
|
// var name = '提示'; //网页名称,可为空;
|
|
var name = i18nMessage('提示',"laydate-tips"); //网页名称,可为空;
|
|
var iWidth = 1024; //弹出窗口的宽度;
|
|
var iHeight = 1024; //弹出窗口的高度;
|
|
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,scrollbars=yes,location=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
|
|
showInfo.focus();
|
|
|
|
}
|
|
|
|
function onDeleteButtonClicked(e){
|
|
|
|
if(hostName == "" || manageCom == "" || bussType == "") {
|
|
// afterSubmit("Fail", "请选择一个要删除的对象.", null);
|
|
afterSubmit("Fail", i18nMessage("请选择一个要删除的对象.","LIS-20106"), null);
|
|
return;
|
|
}
|
|
var tSelNo = ESComServerGrid.getSelNo();
|
|
|
|
if (tSelNo != -1) {
|
|
manageCom = "";
|
|
bussType = "";
|
|
hostName = "";
|
|
try{
|
|
manageCom = ESComServerGrid.getRowColData(tSelNo - 1, 1);
|
|
bussType = ESComServerGrid.getRowColData(tSelNo - 1, 2);
|
|
hostName = ESComServerGrid.getRowColData(tSelNo - 1, 3);
|
|
}catch(ex){
|
|
|
|
}
|
|
var ManageComInput = document.getElementById("ManageComInput");
|
|
var BussTypeInput = document.getElementById("BussTypeInput");
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
}
|
|
var fmActionInput = document.getElementById("fmActionInput");
|
|
var fmElement = document.getElementById("fm");
|
|
//fmActionInput.value = "DELETE";
|
|
document.getElementById("fmActionInput").value="DELETE";
|
|
// fm.submit();
|
|
// fmElement.submit();
|
|
fm.action="../API/easyscan/config/ESComServerSave/DELETE";
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
}
|
|
|
|
function onGridRowSelected(e){
|
|
var tSelNo = ESComServerGrid.getSelNo();
|
|
if (tSelNo != -1) {
|
|
manageCom = "";
|
|
bussType = "";
|
|
hostName = "";
|
|
try{
|
|
manageCom = ESComServerGrid.getRowColData(tSelNo - 1, 1);
|
|
bussType = ESComServerGrid.getRowColData(tSelNo - 1, 2);
|
|
hostName = ESComServerGrid.getRowColData(tSelNo - 1, 3);
|
|
}catch(ex){
|
|
|
|
}
|
|
var ManageComInput = document.getElementById("ManageComInput");
|
|
var BussTypeInput = document.getElementById("BussTypeInput");
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
ManageComInput.value = manageCom;
|
|
BussTypeInput.value = bussType;
|
|
HostNameInput.value = hostName;
|
|
}
|
|
}
|
|
|