IVET#34563 Optimalisatie inspectiescherm
svn path=/Website/branches/v2015.3/; revision=27642
This commit is contained in:
@@ -26,6 +26,7 @@ var today = getQParamInt("today", -1);
|
||||
var alg_ruimte_key = getQParamInt("alg_ruimte_key", -1);
|
||||
var srtcontrole_key = getQParamInt("srtcontrole_key", -1);
|
||||
var deelsrtcont_key = getQParamInt("deelsrtcont_key", -1); // Bestaande inspectie
|
||||
var defaultmode_key = getQParamInt("defaultmode", -1); // Default controlemode
|
||||
|
||||
if (alg_ruimte_key > 0)
|
||||
{
|
||||
@@ -75,6 +76,23 @@ if (srtcontrole_key < 0)
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdate (id.ins_deel_key, isc.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "")
|
||||
+ " GROUP BY id.ins_deel_omschrijving";
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (oRs.Eof) // er is niets over
|
||||
{
|
||||
//shared.simpel_page(L("lcl_pda_ins_noinspect"));
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<% FCLTMHeader.Generate({}); %>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
FcltMgr.closeDetail(window);
|
||||
</script>
|
||||
</body>
|
||||
<%
|
||||
Response.End;
|
||||
}
|
||||
|
||||
var aantal_srtcontoles = oRs("aantal_srtcontoles").Value;
|
||||
var ins_deel_omschrijving = oRs("ins_deel_omschrijving").Value;
|
||||
if (aantal_srtcontoles == 1)
|
||||
@@ -82,7 +100,7 @@ if (srtcontrole_key < 0)
|
||||
oRs.close();
|
||||
}
|
||||
|
||||
if (srtcontrole_key < 0)
|
||||
if (srtcontrole_key < 0 || defaultmode_key > 0)
|
||||
{ // Eerst een soort controle bepalen.
|
||||
%>
|
||||
<html>
|
||||
@@ -130,10 +148,20 @@ if (srtcontrole_key < 0)
|
||||
+ " WHERE COALESCE (ins_srtcontroledl_xcp_eenheid, ins_srtcontrole_eenheid) <> 0"
|
||||
+ (today != -1 ? " AND TRUNC(FAC.nextcyclusdate (i.ins_deel_key, i.ins_srtcontrole_key, 1)) <= TRUNC(sysdate) " : "");
|
||||
|
||||
function fnDetail(oRs, params)
|
||||
{
|
||||
var klikker = "";
|
||||
if (defaultmode_key > 0)
|
||||
{
|
||||
var klikker = "<img src='../Pictures/innemen.png' onclick='default_inspect({0});return false;' style='margin-right:10px;'>".format(oRs.Fields("ins_srtcontrole_key").Value)
|
||||
}
|
||||
return klikker + safe.html(oRs.Fields("ins_srtcontrole_omschrijving").Value);
|
||||
}
|
||||
|
||||
var rst = new ResultsetTable({sql: sql,
|
||||
keyColumn: "ins_srtcontrole_key",
|
||||
linkColumn: fncolLink,
|
||||
detailColumn: "ins_srtcontrole_omschrijving",
|
||||
detailColumn: fnDetail, //"ins_srtcontrole_omschrijving",
|
||||
ID: "srtcontroletable",
|
||||
showAll: true,
|
||||
noSearch: true
|
||||
@@ -145,6 +173,31 @@ if (srtcontrole_key < 0)
|
||||
FOOTER();
|
||||
PAGE_END();
|
||||
%>
|
||||
<script>
|
||||
function ins_submit_callback(json)
|
||||
{
|
||||
if (json.success)
|
||||
{
|
||||
jqToast(L("lcl_mobile_data_saved"));
|
||||
FcltMgr.reload();
|
||||
}
|
||||
}
|
||||
function default_inspect(deelsrtcont_key)
|
||||
{
|
||||
var data = { ins_keys: <%=ins_key%>,
|
||||
sel_srtcontrole: deelsrtcont_key,
|
||||
sel_controlemode: <%=defaultmode_key%>
|
||||
};
|
||||
<% protectRequest.dataToken("data"); %>
|
||||
|
||||
//alert("ins {0}, soort {1}, mode {2}".format(<%=ins_key%>, deelsrtcont_key, <%=defaultmode_key%>));
|
||||
$.post("../ins/ins_inspect_save.asp",
|
||||
data,
|
||||
McltCallbackAndThen(ins_submit_callback),
|
||||
"json");
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<%
|
||||
@@ -207,7 +260,7 @@ else
|
||||
{
|
||||
if (json.success)
|
||||
{
|
||||
jqToast("Gegevens zijn opgeslagen");
|
||||
jqToast(L("lcl_mobile_data_saved"));
|
||||
window.deelsrtcont_key = json.deelsrtcontrole_key;
|
||||
//
|
||||
// reload kenmerken.
|
||||
|
||||
Reference in New Issue
Block a user