Commit 42d83246 by wancheng

回车优化

parent 50ba292c
......@@ -184,6 +184,8 @@ $(function() {
// 保存
$("#BTN_SAVE").on("click", save);
downKeyUp();
});
/**
......
......@@ -15,6 +15,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -38,7 +38,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -14,7 +14,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -15,7 +15,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -14,7 +14,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -196,6 +196,8 @@ $(function() {
// 保存
$("#BTN_SAVE").on("click", save);
downKeyUp();
});
/**
......
......@@ -14,7 +14,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -36,7 +36,7 @@ $(function() {
deleteFunc();
}
}
downKeyUp();
});
/**
......
......@@ -36,7 +36,7 @@ $(function() {
deleteFunc();
}
}
downKeyUp();
});
/**
......
......@@ -36,7 +36,7 @@ $(function() {
deleteFunc();
}
}
downKeyUp();
});
/**
......
......@@ -76,7 +76,7 @@ $(function() {
deleteFunc();
}
}
downKeyUp();
});
/**
......
......@@ -36,7 +36,7 @@ $(function() {
deleteFunc();
}
}
downKeyUp();
});
/**
......
......@@ -599,6 +599,7 @@ $(function () {
}
}, {async: false});
});
downKeyUp();
});
$(window).load(function () {
......
......@@ -142,6 +142,7 @@ $(function () {
}
}, {async: false});
});
downKeyUp();
});
function showUploadFile(id) {
......
......@@ -62,7 +62,7 @@ $(function () {
}
$("#QUERY").on("click", query);
downKeyUp();
});
/**
......
......@@ -355,6 +355,7 @@ $(function () {
var href = ctx + "\\HP\\template\\SC\\HPSC006_生产下料.xls";
window.location.href = href;
});
downKeyUp();
});
query = function () {
resultGrid.dataSource.page(1);
......
......@@ -14,7 +14,7 @@ $(function () {
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
......
......@@ -422,3 +422,26 @@ function drawGrid(blockId, jsonObj, gridIdSuffix, descNameInited) {
__grid_ef_grid_result.paint();
});
};
/**
* 回车退出编辑状态
*/
function downKeyUp() {
window.document.addEventListener("keyup", function (event) {
debugger;
if (event.keyCode === 13) {
var grid1 = $("#ef_grid_result").data("kendoGrid");
var grid2 = $("#ef_grid_detail").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
if(grid1 !== undefined){
grid1.closeCell();
}
if(grid2 !== undefined){
grid2.closeCell();
}
}
})
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment