420 lines
18 KiB
Smarty
420 lines
18 KiB
Smarty
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
|
|
</head>
|
|
|
|
|
|
|
|
<div class="row sortable">
|
|
<div class="col-sm-4">
|
|
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<b><span style='font-size:12pt;line-height:115%; color:#4F81BD'><a class="button-blue" href="?s=pwtag&wahl=1&jahr={$jahr}&monat={$monat}">«</a>   {$monat}/{$jahr}  <a class="button-blue" href="?s=pwtag&wahl=2&jahr={$jahr}&monat={$monat}">»</a>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<a class="button button-orange" href="?s=list_pwtag&jahr={$jahr}&monat={$monat}&tid={$anzeige}">PDF/Monat</a></div>
|
|
</div></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
<div class="panel-group" id="accordion">
|
|
{foreach from=$tag_tour item=t_tour}
|
|
{if $t_tour.menge>0}
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title">
|
|
<a data-toggle="collapse" data-parent="#accordion" href="{$t_tour.raute}">{$t_tour.name1} ({$t_tour.name2})</a></h4>
|
|
</div>
|
|
{if $t_tour.typ==$t_tour.col} <!-- fenster aufgeklappt bei auswahl des types -->
|
|
<div id={$t_tour.typ} class="panel-collapse collapse in">
|
|
{else}
|
|
<div id={$t_tour.typ} class="panel-collapse collapse">
|
|
{/if}
|
|
<div class="panel-body">
|
|
{foreach from=$t_tour.tdata item=tlist}
|
|
<table class="no-style full">
|
|
<thead>
|
|
{if $tlist.aktiv==0}
|
|
<tr>
|
|
<td style="font-size:10pt;color:gray" onclick="window.location='?s=pwtag&id={$tlist.id}&jahr={$jahr}&monat={$monat}'">{$tlist.tour}
|
|
</td>
|
|
{else}
|
|
<tr>
|
|
<td style="font-size:10pt;color:blue" onclick="window.location='?s=pwtag&id={$tlist.id}&jahr={$jahr}&monat={$monat}'">{$tlist.tour}
|
|
</td>
|
|
{/if}
|
|
|
|
<td nowrap style="font-size:6pt"> {$tlist.infotitel}</td>
|
|
|
|
<!--
|
|
<td nowrap style="font-size:11pt"><a href="?s=pwtag&id={$tlist.id}&jahr={$jahr}&monat={$monat}" title="Kicke zum auswälen" >{$tlist.tour}</a></td>
|
|
<td nowrap style="font-size:8pt"> {$tlist.infotitel}</td>
|
|
-->
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
|
|
{if $anzeige==0}
|
|
<div class="col-md-9">
|
|
<div class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title">Info</span></h2></header>
|
|
<section class="panel-body">
|
|
<header class="current"><h2>Info </h2></header>
|
|
<span style='font-size:10pt;line-height:115%; color:#4F81BD'>
|
|
Bitte die Tour auwählen die Sie bearbeiten möchten.
|
|
</span>
|
|
</div>
|
|
|
|
<div id="plan_tour" style="text-align:center;"></div>
|
|
|
|
|
|
</div>
|
|
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// rechte seite -->
|
|
{else}
|
|
<!-- ///////////////// menu seite -->
|
|
{if $infoanz>0}
|
|
<div class="col-md-6">
|
|
<div class="panel panel-danger">
|
|
<div class="panel-heading">unklare Tourenplanung</div>
|
|
<div class="panel-body" style="height:120px;overflow-y: scroll;">
|
|
<table class="table-condensed">
|
|
<tbody> {foreach from=$infod item=info }
|
|
{if $info.infotyp==4}
|
|
<td nowrap style="color:orange;width:60px;line-height:60%;font-size:10pt"> <strong>{$info.date|date_format:"%d.%m.%Y"}</strong></td>
|
|
<td nowrap style="color:orange;width:180px;line-height:60%;font-size:10pt"> <strong>{$info.info}</strong></td>
|
|
<td nowrap style="color:#B1B1B1;width:400px;line-height:60%;font-size:10pt"> <strong>{$info.text}</strong></td>
|
|
{else}
|
|
<td nowrap style="color:red;width:60px;line-height:60%;font-size:10pt"> <strong>{$info.date|date_format:"%d.%m.%Y"}</strong></td>
|
|
<td nowrap style="color:red;width:180px;line-height:60%;font-size:10pt"> <strong>{$info.info}</strong></td>
|
|
<td nowrap style="color:#B1B1B1;width:400px;line-height:60%;font-size:8pt"> <strong>{$info.text}</strong></td>
|
|
{/if}
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{elseif $ersanz>0}
|
|
<div class="col-md-6">
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading">Tourenplanung</div>
|
|
<div class="panel-body" style="max-height:120px;overflow-y: scroll;">
|
|
<table class="table-condensed">
|
|
<tbody> {foreach from=$ersatzx item=ersatz }
|
|
<td nowrap style="color:#569EFD;width:60px;line-height:60%;font-size:10pt"> <strong>{$ersatz.date|date_format:"%d.%m.%Y"}</strong></td>
|
|
<td nowrap style="color:#569EFD;width:160px;line-height:60%;font-size:10pt"> <strong>{$ersatz.info}</strong></td>
|
|
<td nowrap style="color:#B1B1B1;width:400px;line-height:60%;font-size:10pt"> <strong>{$ersatz.text}</strong></td>
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{else}
|
|
<div class="col-md-6">
|
|
<div class="panel panel-success">
|
|
<div class="panel-heading">gute Tourenplanung</div>
|
|
<table class="table-condensed">
|
|
<tbody> {foreach from=$infod item=info }
|
|
<td nowrap style="color:red;width:60px;line-height:60%;font-size:10pt"> <strong>{$info.date|date_format:"%d.%m.%Y"}</strong></td>
|
|
<td nowrap style="color:red;width:400px;line-height:60%;font-size:10pt"> <strong>{$info.info}</strong></td>
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
<!-- ***** kompletten Monat einzeln Daten ändern ***** -->
|
|
<div class="col-md-3">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Monat kopieren</div>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<form action="" method="post">
|
|
<td style="width:90%;">Startzeit <input type="text" value="{$tour.zeit}" style="width:50px;" name="ezeit" placeholder="14:30"></td>
|
|
<td><input type="image" name="ezeit2" value="{$tourname}" src="template/images/icon/save.png"/></td>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<!-- --------------------------- fahrer -->
|
|
<tr>
|
|
|
|
<form action="" method="post">
|
|
<td style="width:90%x;"><select name="efahrer" style="width:150px;" >
|
|
{foreach from=$fahrer_array item=allfahrer}
|
|
{html_options values=$allfahrer.id output=$allfahrer.name selected=$s_fahrer}
|
|
{/foreach}
|
|
</select></td>
|
|
<td><input type="image" name="efahrer2" value="{$tourname}" src="template/images/icon/save.png"/></td>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<!-- --------------------------- Fahrzeug -->
|
|
<tr>
|
|
<form action="" method="post">
|
|
<td style="width:180px;"><select name="eauto" style="width:180px;" >
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id output=$allauto.kz selected=$s_auto}
|
|
{/foreach}
|
|
</select></td>
|
|
<td><input type="image" name="eauto2" value="{$tourname}" src="template/images/icon/save.png"/></td>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-9">
|
|
<div class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title">Tourenplanung ges. Monat {$tourname}</span></h2></header>
|
|
<section class="panel-body">
|
|
<table class="no-style full" style="font-size: 10pt">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:70px" align="left">Tour</th>
|
|
<th style="width:50px" align="left">Zeit</th>
|
|
<th style="width:190px" align="left">Fahrer</th>
|
|
<th style="width:130px" align="left">Fahrzeug</th>
|
|
<th style="width:300px" align="left">z.Info</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<form action="" method="post">
|
|
{foreach from=$tour_edit item=tour}
|
|
{if $tour.tagnr==1}
|
|
<td><hr style="color: red; height: 1px;" /></td>
|
|
<td><hr style="color: red; height: 1px;" /></td>
|
|
<td><hr style="color: red; height: 1px;" /></td>
|
|
<td><hr style="color: red; height: 1px;" /></td>
|
|
<td><hr style="color: red; height: 1px;" /></td>
|
|
|
|
{/if}
|
|
<tr>
|
|
<td style="width:70px"><b>{$tour.date|date_format:"%d.%m.%y"}</td>
|
|
<td><input type="text" value="{$tour.zeit}" id="time_{$tour.id}" style="width:45px;" name="list[{$tour.tid}][zeit]" onChange="save_time({$tour.id})"></td>
|
|
<td style="width:190px"><center>
|
|
<!--
|
|
1= kein Fahrer ausgewählt
|
|
2= fahrer hat Kalendereintrag
|
|
3= nicht stammfahrer
|
|
4= doppelt N8 einsatz
|
|
-->
|
|
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}"
|
|
{if $tour.fahrer_na==1} style="border-color:red;width:180px;" onChange="save_user({$tour.id})"
|
|
|
|
{elseif $tour.fahrer_na==2} style="border-color:red;width:180px;" onChange="save_user({$tour.id})"
|
|
{elseif $tour.fahrer_na==3} style="border-color:blue;width:180px;" onChange="save_user({$tour.id})"
|
|
{elseif $tour.fahrer_na==4} style="border-color:orange;width:180px;" onChange="save_user({$tour.id})"
|
|
{else} style="width:180px;"onChange="save_user({$tour.id})"{/if}>
|
|
{foreach from=$fahrer_array item=allfahrer}
|
|
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} ><strong>{$allfahrer.name}</strong></option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
</td>
|
|
|
|
<!-- --------------------------- Fahrzeug -->
|
|
<td style="width:130px"><center>
|
|
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:90px;" onChange="save_car({$tour.id})"/>
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<input type="text" value="{$tour.infotext}" id="info_{$tour.id}" style="width:90%;" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})"/></td>
|
|
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/><input type="hidden" name="testsave" value="{$tour.id}" >
|
|
<!-- <input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/> -->
|
|
<td> <center>
|
|
{if $tour.smsid==0 && $tour.fahrer_id>0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/sms2.png"/>{/if}
|
|
{if $tour.smsid>0 && $tour.fahrer_id>0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/okay.png"/>{/if}
|
|
{if $tour.fahrer_id==0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/nosms.png"/>{/if}
|
|
</center>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
{/foreach}
|
|
</tbody>
|
|
</div></div>
|
|
|
|
|
|
<dl>
|
|
<section>
|
|
<table class="no-style full" id="trp" style="font-size:11pt">
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
{/if}
|
|
|
|
</div></div></div></div>
|
|
|
|
|
|
<script> var tagheute ='{$datum_unix|date_format:"%Y-%m-%d"}';</script>
|
|
{literal}
|
|
<script type="text/javascript">
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=plan_tour&tpl',
|
|
cache : false,
|
|
data : {
|
|
},
|
|
dataType : "html",
|
|
success : function(data){
|
|
$("#plan_tour").html(data);
|
|
},
|
|
});
|
|
function save_info(tourID) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=paktuell2&a=info_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&info=" + $("#info_"+tourID).val(),
|
|
success: function (data) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'info',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
|
|
console.log(data)
|
|
}
|
|
});
|
|
}
|
|
function save_time(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=paktuell2&a=time_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&time=" + $("#time_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'info',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
}
|
|
console.log(data)
|
|
}
|
|
});
|
|
}
|
|
function save_car(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=paktuell2&a=car_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&car=" + $("#car_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
load_free_cars(tourID,tagheute)
|
|
}
|
|
console.log(data)
|
|
}
|
|
});
|
|
}
|
|
|
|
load_free_cars(0,tagheute);
|
|
|
|
function save_user(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=paktuell2&a=user_save",
|
|
dataType: 'json',
|
|
data: 'tourID=' + tourID + "&user=" + $("#user_"+tourID).val(),
|
|
success: function (data) {
|
|
if(data.success == true) {
|
|
$.notify({
|
|
icon: 'glyphicon glyphicon-warning-ok',
|
|
message: data.lastnote
|
|
},{
|
|
type: 'success',
|
|
showProgressbar: true,
|
|
delay: 300,
|
|
newest_on_top: false,
|
|
element: 'body',
|
|
placement: {
|
|
from: "bottom",
|
|
align: "right"
|
|
},
|
|
animate: {
|
|
enter: 'animated fadeInDown',
|
|
exit: 'animated fadeOutUp'
|
|
}
|
|
});
|
|
}
|
|
console.log(data)
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
{/literal}
|
|
|