jb-data.de/template/tpl/rpin1.tpl
2025-08-11 22:23:30 +02:00

418 lines
22 KiB
Smarty

<div class="row sortable">
<div class="col-md-8">
{if $wtag==1}<div class="panel panel-info">{else}<div class="panel panel-warning">{/if}
<header class="panel-heading"><h2 class="panel-title">LVZ-Logistik (PIN-Rtour) {$datum1}</span></h2></header>
<form action="" method="post">
<section class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$pin_tour1 item=tour}
<tr>
<td nowrap style="line-height:10pt;font-size:11pt;width:90px"> <b>{$tour.tour}</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:54px">
<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 nowrap style="line-height:10pt;font-size:11pt;width:170px">
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}" style="width:160px;" onChange="save_user({$tour.id})">
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="line-height:10pt;font-size:11pt;width:110px">
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})">
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:300px">
<input type="int" value="{$tour.infotext}" id="info_{$tour.id}" style="line-height:10pt;width:290px" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})">
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/>
</td>
<td nowrap style="line-height:10pt;font-size:11pt">
{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>
</table>
</div>
<!-- -->
{if $wtag==2}<div class="panel panel-info">{else}<div class="panel panel-warning">{/if}
<header class="panel-heading"><h2 class="panel-title">LVZ-Logistik (PIN-Rtour) {$datum2}</span></h2></header>
<form action="" method="post">
<section class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$pin_tour2 item=tour}
<tr>
<td nowrap style="line-height:10pt;font-size:11pt;width:90px"> <b>{$tour.tour}</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:54px">
<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 nowrap style="line-height:10pt;font-size:11pt;width:170px">
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}" style="width:160px;" onChange="save_user({$tour.id})">
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="line-height:10pt;font-size:11pt;width:110px">
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})">
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:300px">
<input type="int" value="{$tour.infotext}" id="info_{$tour.id}" style="line-height:10pt;width:290px" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})">
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/>
</td>
<td nowrap style="line-height:10pt;font-size:11pt">
{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>
</table>
</div>
<!-- -->
{if $wtag==3}<div class="panel panel-info">{else}<div class="panel panel-warning">{/if}
<header class="panel-heading"><h2 class="panel-title">LVZ-Logistik (PIN-Rtour) {$datum3}</span></h2></header>
<form action="" method="post">
<section class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$pin_tour3 item=tour}
<tr>
<td nowrap style="line-height:10pt;font-size:11pt;width:90px"> <b>{$tour.tour}</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:54px">
<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 nowrap style="line-height:10pt;font-size:11pt;width:170px">
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}" style="width:160px;" onChange="save_user({$tour.id})">
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="line-height:10pt;font-size:11pt;width:110px">
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})">
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:300px">
<input type="int" value="{$tour.infotext}" id="info_{$tour.id}" style="line-height:10pt;width:290px" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})">
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/>
</td>
<td nowrap style="line-height:10pt;font-size:11pt">
{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>
</table>
</div>
<!-- -->
{if $wtag==4}<div class="panel panel-info">{else}<div class="panel panel-warning">{/if}
<header class="panel-heading"><h2 class="panel-title">LVZ-Logistik (PIN-Rtour) {$datum4}</span></h2></header>
<form action="" method="post">
<section class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$pin_tour4 item=tour}
<tr>
<td nowrap style="line-height:10pt;font-size:11pt;width:90px"> <b>{$tour.tour}</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:54px">
<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 nowrap style="line-height:10pt;font-size:11pt;width:170px">
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}" style="width:160px;" onChange="save_user({$tour.id})">
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="line-height:10pt;font-size:11pt;width:110px">
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})">
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:300px">
<input type="int" value="{$tour.infotext}" id="info_{$tour.id}" style="line-height:10pt;width:290px" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})">
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/>
</td>
<td nowrap style="line-height:10pt;font-size:11pt">
{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>
</table>
</div>
<!-- -->
{if $wtag==5}<div class="panel panel-info">{else}<div class="panel panel-warning">{/if}
<header class="panel-heading"><h2 class="panel-title">LVZ-Logistik (PIN-Rtour) {$datum5}</span></h2></header>
<form action="" method="post">
<section class="panel-body">
<table class="no-style full">
<tbody>
{foreach from=$pin_tour5 item=tour}
<tr>
<td nowrap style="line-height:10pt;font-size:11pt;width:90px"> <b>{$tour.tour}</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:54px">
<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 nowrap style="line-height:10pt;font-size:11pt;width:170px">
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}" style="width:160px;" onChange="save_user({$tour.id})">
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="line-height:10pt;font-size:11pt;width:110px">
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})">
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td nowrap style="line-height:10pt;font-size:11pt;width:300px">
<input type="int" value="{$tour.infotext}" id="info_{$tour.id}" style="line-height:10pt;width:290px" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})">
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/>
</td>
<td nowrap style="line-height:10pt;font-size:11pt">
{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>
</table>
</div>
<!--
<input type="submit" name="testsave" value="Speichern" >
-->
</div>
<!-- ///////////////// rechte seite -->
<!-- Sidebar -->
<aside class="col-md-4">
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">Auswahl anzeigen</h2></header>
<section class="panel-body">
<table class="no-style full">
<tbody>
<td><a class="btn btn-primary btn-block" href="?s=rpin1">K.Woche</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td><a class="btn btn-primary btn-block" href="?s=rpin2">kompl. Monat</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td><a class="btn btn-warning btn-block" href="?s=list_rpin1&jahr={$jahr}&kw={$kw}">PDF/Woche</a></td>
</tbody>
</table>
</section>
</div>
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">Kalenderwoche wechseln</h2></header>
<!-- <div class="panel-body" style="max-height:50px;overflow-y: noscroll;"> -->
<div class="panel-body">
<table class="no-style full">
<tbody>
<tr>
<td align="center"><h4>{$infodatum}</h4></td>
</tr>
<tr>
<td align="center">
<div class="btn-group">
<a class="btn btn-primary" href="?s=rpin1&wahl=1&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-default">{$kw}.KW</button>
</a>
<a class="btn btn-primary" href="?s=rpin1&wahl=2&jahr={$jahr}&kw={$kw}" aria-label="Skip to main navigation">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <td nowrap style="line-height:10pt;font-size:24pt"><a class="button-blue" href="?s=rpin1&wahl=1&jahr={$jahr}&kw={$kw}">&laquo;</a></td> -->
<!-- <td><a class="button-blue" href="?s=rpin1&wahl=2&jahr={$jahr}&kw={$kw}">&raquo;</a></td> -->
</div>
</aside>
<!-- Sidebar End -->
</div></div>
<script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script>
{literal}
<script>
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=prundschau&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'
}
});
}
console.log(data)
}
});
}
load_free_cars(0,tagheute);
function save_user(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=prundschau&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}