118 lines
4.1 KiB
Plaintext
118 lines
4.1 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: mld/kpi_search.asp
|
|
|
|
Noot: vereist een storedprocedure cust.refreshscore(userkey) om de kpi_score tabel te verversen
|
|
*/ %>
|
|
|
|
<!-- #include file="../Shared/common.inc" -->
|
|
<!-- #include file="../Shared/iface.inc" -->
|
|
<!-- #include file="../Shared/selector.inc" -->
|
|
|
|
<%
|
|
FCLTHeader.Requires({ plugins:["jQuery", "bootstrap"] });
|
|
/***** Get webform parameters *****/
|
|
var fclt_key = getQParamInt("fclt_key", -1);
|
|
var periode = getQParam("periode", "");
|
|
var toon = getQParam("toon", 0);
|
|
|
|
var sql_configcheck = "SELECT COUNT(*) FROM kpi_definitie";
|
|
var oRs = Oracle.Execute(sql_configcheck);
|
|
user.anything_todo_or_abort(oRs(0).value > 0);
|
|
|
|
var freeze = getQParamInt("freeze", 0);
|
|
if (freeze == 1)
|
|
{ // Mag best een tikje robuuster, maar hoe he?
|
|
var sql = "BEGIN " + customerId + ".refreshscore("+user_key+"); END;";
|
|
Oracle.Execute(sql);
|
|
}
|
|
|
|
/***** Selector sql *****/
|
|
|
|
var sql_l = " SELECT DISTINCT l.alg_locatie_key"
|
|
+ " , " + S("alg_loc_string")
|
|
+ " FROM kpi_v_kpi_scores sc"
|
|
+ " , alg_locatie l"
|
|
+ " WHERE sc.alg_locatie_key = l.alg_locatie_key"
|
|
+ " ORDER BY 2";
|
|
|
|
var sql_p = "SELECT DISTINCT to_char(kpi_score_datum, 'YYYYMM'), to_char(kpi_score_datum, 'YYYY-MM')"
|
|
+ " FROM kpi_score"
|
|
+ " ORDER BY 1 DESC";
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<% FCLTHeader.Generate(); %>
|
|
|
|
<script type="text/javascript">
|
|
function doSubmit()
|
|
{
|
|
document.forms.u2.submit();
|
|
}
|
|
function doBijwerken()
|
|
{
|
|
var url = "kpi_search.asp?freeze=1&" + $("[name=u2]").serialize();
|
|
window.location.href = url;
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body id="searchbody">
|
|
<form name="u2" target="workFrame" action="kpi_search_list.asp" method="get">
|
|
<% SEARCH_PAGE_START({ header: L("lcl_filterblok") });
|
|
SEARCH_BLOCK_START(); %>
|
|
<input type="hidden" id="widget_height" name="widget_height" value="200">
|
|
<% // gewoon plaatsselector met filtercode KPI = komt voor in kpi_score
|
|
FCLTselector("loc_key",
|
|
sql_l,
|
|
{ trclass: "primsearch",
|
|
label: L("lcl_location"),
|
|
initKey: fclt_key,
|
|
emptyKey: "-1",
|
|
emptyOption: ""
|
|
});
|
|
%>
|
|
<tr class="primsearch">
|
|
<td class="label">
|
|
<label><%=L("lcl_kpi_toon")%></label>
|
|
</td>
|
|
<td>
|
|
<label for="mld_opdr_p"><input type="radio" name="toon" id="mld_opdr_p" value="0" <%=toon==0?"checked":""%>><%=L("lcl_kpi_cat2_per_cat1")%>
|
|
<label for="mld_opdr_o"><input type="radio" name="toon" id="mld_opdr_o" value="1" <%=toon==1?"checked":""%>><%=L("lcl_kpi_cat1_per_cat2")%>
|
|
</td>
|
|
</tr>
|
|
<% SEARCH_BLOCK_END();
|
|
SEARCH_BLOCK_START();
|
|
FCLTselector("periode",
|
|
sql_p,
|
|
{ trclass: "primsearch",
|
|
label: L("lcl_ins_controle_period"),
|
|
initKey: periode
|
|
});
|
|
SEARCH_BLOCK_END()
|
|
var buttons = [{ title: L("lcl_show"), icon: "fa-chart-area", action: "doSubmit();"},
|
|
{ title: L("lcl_kpi_bijwerken"), icon: "fa-fclt-refresh", action: "doBijwerken();"}
|
|
];
|
|
SIMPLE_BLOCK_START();
|
|
CreateButtons(buttons, { entersubmit: true, showIcons: true });
|
|
SIMPLE_BLOCK_END();
|
|
SEARCH_PAGE_END(); %>
|
|
</form>
|
|
|
|
<div id="result">
|
|
<iframe width="100%" height="100%"
|
|
src="../Shared/empty.asp"
|
|
name="workFrame" id="workFrame"
|
|
onload='FcltMgr.iframeLoaded(this)'
|
|
frameborder="0" scrolling="no">
|
|
</iframe>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<% ASPPAGE_END(); %>
|