210 lines
6.3 KiB
HTML
210 lines
6.3 KiB
HTML
|
<html>
|
|||
|
<head>
|
|||
|
<title>Ansicht Bereitstellung</title>
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|||
|
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
|||
|
|
|||
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css">
|
|||
|
|
|||
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
|||
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
|||
|
|
|||
|
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
|||
|
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
|
|||
|
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
|
|||
|
<script src="utilities.js"></script>
|
|||
|
<style>
|
|||
|
|
|||
|
#tableWithPreparedProds,#tableWithDeliveredEntries,#headertableToCook
|
|||
|
{
|
|||
|
width:100%;
|
|||
|
}
|
|||
|
|
|||
|
#tableWithPreparedProds tr:hover td {
|
|||
|
background-color: #ffaaff;
|
|||
|
}
|
|||
|
|
|||
|
#declareready,#declarenotcooked {
|
|||
|
text-align:center;
|
|||
|
vertical-align:middle;
|
|||
|
}
|
|||
|
|
|||
|
#readybutton,#notreadybutton,#alldeliverbutton {
|
|||
|
width:90%;
|
|||
|
}
|
|||
|
|
|||
|
#optiontext
|
|||
|
{
|
|||
|
font-family:sans-serif;
|
|||
|
font-size:10pt;
|
|||
|
color:black;
|
|||
|
}
|
|||
|
|
|||
|
#tableWithDeliveredEntries td {
|
|||
|
background:#b4b4ec
|
|||
|
}
|
|||
|
|
|||
|
.dividerline {
|
|||
|
height: 10px;
|
|||
|
}
|
|||
|
|
|||
|
</style>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
|
|||
|
<script>
|
|||
|
|
|||
|
|
|||
|
// refreshing the content
|
|||
|
$(document).ready(function() {
|
|||
|
var refreshId = setInterval(function() {
|
|||
|
getAndDisplayAllEntries();
|
|||
|
}, 10000);
|
|||
|
$.ajaxSetup({ cache: false });
|
|||
|
});
|
|||
|
|
|||
|
function getPreparedProds() {
|
|||
|
doAjax("GET","php/contenthandler.php?module=queue&command=getJsonAllPreparedProducts",null,fillTableWithPreparedProds,"Vorbereitete Produkte");
|
|||
|
}
|
|||
|
|
|||
|
function getDeliveredEntries() {
|
|||
|
doAjax("GET","php/contenthandler.php?module=queue&command=getJsonLastDeliveredProducts",null,filltableWithDeliveredEntries,"Bereitgestellte Produkte");
|
|||
|
}
|
|||
|
|
|||
|
function declareProductBeDelivered(queueid) {
|
|||
|
doAjaxNonJsonNonCall("POST","php/contenthandler.php?module=queue&command=declareProductBeDelivered",{ queueid: queueid});
|
|||
|
}
|
|||
|
|
|||
|
function declareMultipleProductsDelivered(queueids) {
|
|||
|
doAjaxNonJsonNonCall("POST","php/contenthandler.php?module=queue&command=declareMultipleProductsDelivered", { queueids: queueids });
|
|||
|
}
|
|||
|
|
|||
|
function declareProductNOTBeDelivered(queueid) {
|
|||
|
doAjaxNonJsonNonCall("POST","php/contenthandler.php?module=queue&command=declareProductNotBeDelivered",{ queueid: queueid});
|
|||
|
}
|
|||
|
|
|||
|
function listOfTable(table) {
|
|||
|
var tableid = table.tableid;
|
|||
|
var tablename = table.tableheadline;
|
|||
|
var theme = 'd';
|
|||
|
var tablestatus = "Unvollst<73>ndig";
|
|||
|
if (table.tablestatus == 'complete') {
|
|||
|
tablestatus = "Komplett";
|
|||
|
theme = "e";
|
|||
|
}
|
|||
|
var aList = '<ul data-role="listview" id="' + tableid + '" data-divider-theme="a" data-inset="true">';
|
|||
|
aList += '<li data-role="list-divider" data-theme="' + theme + '" data-role="heading" data-icon="check">' + tablename + ' (' + tablestatus + ')</li>';
|
|||
|
aList += '<li data-theme="f" data-icon="check" id="table-' + tableid + '" class="preparedtable"><a href="#" ><h2>Alles</h2></A></LI>';
|
|||
|
var itemsForTable = table.prodsOfTable;
|
|||
|
|
|||
|
$.each(itemsForTable, function (i, entry) {
|
|||
|
var option = '';
|
|||
|
if (entry.option != '') {
|
|||
|
option = '<p>' + entry.option + '</p>';
|
|||
|
}
|
|||
|
aList += '<li data-theme="c" data-icon="check" class="preparedlistitem" + id="' + entry.id + '"><a href="#">' + entry.longname + option + '</a></li>';
|
|||
|
});
|
|||
|
|
|||
|
aList += '</ul>';
|
|||
|
return aList;
|
|||
|
}
|
|||
|
|
|||
|
function fillTableWithPreparedProds(entriesToCook) {
|
|||
|
var aList = '';
|
|||
|
|
|||
|
$.each(entriesToCook, function (i, table) {
|
|||
|
aList += listOfTable(table);
|
|||
|
});
|
|||
|
|
|||
|
$("#prodstodeliver").html(aList);
|
|||
|
$("#prodstodeliver").trigger("create");
|
|||
|
|
|||
|
$.each(entriesToCook, function (i, table) {
|
|||
|
$("#table-" + table.tableid).data("queueids", table.ids);
|
|||
|
});
|
|||
|
|
|||
|
$(".preparedlistitem").off("click").on("click", function (e) {
|
|||
|
declareProductBeDelivered($(this).attr("id"));
|
|||
|
getAndDisplayAllEntries();
|
|||
|
});
|
|||
|
|
|||
|
$(".preparedtable").off("click").on("click", function (e) {
|
|||
|
var test = $(this).data("queueids");
|
|||
|
declareMultipleProductsDelivered($(this).data("queueids"));
|
|||
|
getAndDisplayAllEntries();
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
function filltableWithDeliveredEntries(cookedEntries) {
|
|||
|
var theList = '<ul data-role="listview" id="deliveredProdsList" data-divider-theme="a" data-inset="true">';
|
|||
|
theList += '<li data-role="list-divider" data-theme="b" data-role="heading" data-icon="check">Zugestellt</li>';
|
|||
|
$.each(cookedEntries, function (i, queueentry) {
|
|||
|
var prodname = queueentry.longname;
|
|||
|
var queue_entry_id = queueentry.id;
|
|||
|
var tablename = queueentry.tablename;
|
|||
|
theList += '<li data-theme="e" data-icon="arrow-u" id="' + queue_entry_id + '" class="deliveredlistitem"><a href="#">' + prodname;
|
|||
|
theList += '<p>' + tablename + ' - ' + queueentry.delivertime + '</p>';
|
|||
|
theList += '</A></LI>';
|
|||
|
});
|
|||
|
theList += '</ul>';
|
|||
|
|
|||
|
$("#prodsalreadydelivered").html(theList);
|
|||
|
$("#prodsalreadydelivered").trigger("create");
|
|||
|
|
|||
|
$(".deliveredlistitem").off("click").on("click", function (e) {
|
|||
|
declareProductNOTBeDelivered($(this).attr("id"));
|
|||
|
getAndDisplayAllEntries();
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
function getAndDisplayAllEntries ()
|
|||
|
{
|
|||
|
getPreparedProds();
|
|||
|
getDeliveredEntries();
|
|||
|
}
|
|||
|
|
|||
|
//pageinit event for first page
|
|||
|
//triggers only once
|
|||
|
//write all your on-load functions and event handlers pertaining to page1
|
|||
|
$(document).on("pageinit", "#supplydesk-page", function () {
|
|||
|
initializeMainMenu("#modulemenu");
|
|||
|
hideMenu();
|
|||
|
|
|||
|
getAndDisplayAllEntries();
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
</script>
|
|||
|
<!--first page -->
|
|||
|
<div data-role="page" id="supplydesk-page">
|
|||
|
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
|
|||
|
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
|
|||
|
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
|
|||
|
</ul>
|
|||
|
</div><!-- /panel -->
|
|||
|
<div data-role="header" data-theme="b" data-position="fixed">
|
|||
|
<h1>Bereitstellung</h1>
|
|||
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
|||
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<div data-role="content">
|
|||
|
<div id="prodstodeliver"></div>
|
|||
|
<hr>
|
|||
|
<div id="prodsalreadydelivered"></div>
|
|||
|
</div>
|
|||
|
<div data-role="footer" data-theme="b" id="thefooterr">
|
|||
|
<div class="ui-grid-a">
|
|||
|
<div class="ui-block-a userinfo" id="loggedinuser"></div>
|
|||
|
<div class="ui-block-b grid_right" id="versioninfo"></div>
|
|||
|
</div><!-- /grid-a -->
|
|||
|
</div> <!-- footer -->
|
|||
|
</div>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|