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

317 lines
No EOL
11 KiB
Smarty

<div class="panel panel-default collapsible">
<div class="panel-heading"><h2 class="panel-title">Sachsen-Sonntag {$kw}.KW / {$jahr}</h2></div>
<div class="panel-body">
<table class="no-style">
<thead>
<th style="width:68px;font-size:8pt" align="left">Tour</th>
<th style="width:80px;font-size:8pt" align="right">Tour_alt</th>
<th style="width:80px;font-size:8pt" align="left">Zeit</th>
<th style="width:65px;font-size:8pt" align="left">Exemplare</th>
<th style="width:65px;font-size:8pt" align="right">Rampe kg</th>
<th style="width:65px;font-size:8pt" align="right">Tour kg</th>
<th style="width:38px;font-size:8pt" align="right">Norm</th>
<th style="width:80px;font-size:8pt" align="left">Pakete</th>
<th style="width:60px;font-size:8pt" align="right">Pak-Gew.</th>
<th style="width:80px;font-size:8pt" align="right">Car-Gewicht</th>
<th style="width:35px;font-size:8pt" align="left">Rampe</th>
<th style="width:12px;font-size:8pt" align="left">aktion</th>
</thead>
<tbody>
<form action="" method="post">
{foreach from=$saso_tour2 item=tour}
<tr>
<td nowrap style="width:68px;font-size:14pt" align="left">{$tour.tname}</td>
<td nowrap style="width:80px;font-size:10pt" align="right">{$tour.tour}&nbsp;&nbsp;</td>
<td nowrap style="width:80px;font-size:10pt" align="left">
<input type="text" value="{$tour.zeit}" style="width:45px;text-align:right" id="time_{$tour.id}"
style="width:45px;" name="list[{$tour.tid}][zeit]" onChange="save_time({$tour.id})"> Uhr
</td>
<td nowrap style="width:65px;font-size:10pt" align="left">
<input type="text" value="{$tour.exemplare}" style="width:45px;text-align:right"
id="exemplare_{$tour.id}" style="width:45px;" name="list[{$tour.tid}][exemplare]" onChange="save_exemplare({$tour.id})"> St.
</td>
<td nowrap style="width:65px;font-size:10pt" align="right">
<input type="int" value="{$tour.gewicht}" style="width:40px;text-align:right"
id="gewicht_{$tour.id}"name="list[{$tour.tid}][gewicht]" onChange="save_gewicht({$tour.id})"> kg
</td>
<td nowrap style="width:65px;font-size:10pt" align="right">
<input type="int" value="{$tour.gewicht4}" style="width:40px;text-align:right"
id="gewicht4_{$tour.id}" name="list[{$tour.tid}][gewicht4]" onChange="save_gewicht4({$tour.id})"> kg&nbsp;&nbsp;
</td>
{if $tour.utyp>2}
<td nowrap style="width:38px;font-size:10pt" align="right">
<input type="int" value="{$tour.norm}" style="width:33px;text-align:right"
id="norm_{$tour.id}" name="list[{$tour.tid}][norm]" onChange="save_norm({$tour.id})"></td>
{else}
<td nowrap style="width:38px;font-size:10pt">{$tour.norm}</strong></td>
{/if}
{if $tour.tourid>1000}
<td nowrap style="width:80px;font-size:10pt" align="right">
<input type="int" value="{$tour.pakete2}" style="width:33px;"
id="pakete2_{$tour.id}" name="list[{$tour.tid}][norm]" onChange="save_pakete2({$tour.id})">/ {$tour.pakete}&nbsp;&nbsp;</td>
{else}
<td nowrap style="width:80px;font-size:10pt" align="right">{$tour.pakete2} / {$tour.pakete}&nbsp;&nbsp;</strong></td>
{/if}
<td nowrap style="width:60px;font-size:10pt" align="right">{$tour.gewicht2|string_format:"%.2f"} kg</td>
<td nowrap style="width:80px;font-size:10pt" align="right">{$tour.gewicht3} kg</td>
<td nowrap style="width:35px;font-size:10pt"><input type="int" value="{$tour.rampe}" style="width:32px;"
id="rampe_{$tour.id}" name="list[{$tour.tid}][rampe]" onChange="save_rampe({$tour.id})"> </td>
<input type="hidden" name="list[{$tour.tid}][tnr]" value="{$tour.tnr}"/>
<input type="hidden" name="list[{$tour.tid}][kw]" value="{$kw}"/>
<input type="hidden" name="list[{$tour.tid}][jahr]" value="{$jahr}"/>
<td><input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/><input type="hidden" name="testsave" value="{$tour.id}" ></td>
<td>{if $tour.tourid>8000}
<input type="image" name="delete2" value="{$tour.id}" src="template/images/icon/cross.png" onclick="return confirm('M&ouml;chten sie wirklich {$tour.tour} löschen ?')" />
{else}
<td> </td>
{/if}
</td>
</tr>
{/foreach}
<input type="submit" name="testsave" value="Speichern" >
</form>
<tbody>
</table>
</div>
</div>
{literal}
<script>
function save_exemplare(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_exemplare",
dataType: 'json',
data: 'tourID=' + tourID + "&exemplare=" + $("#exemplare_"+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) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&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_gewicht(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_gewicht",
dataType: 'json',
data: 'tourID=' + tourID + "&gewicht=" + $("#gewicht_"+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_gewicht4(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_gewicht4",
dataType: 'json',
data: 'tourID=' + tourID + "&gewicht4=" + $("#gewicht4_"+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_rampe(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_rampe",
dataType: 'json',
data: 'tourID=' + tourID + "&rampe=" + $("#rampe_"+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_norm(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_norm",
dataType: 'json',
data: 'tourID=' + tourID + "&norm=" + $("#norm_"+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_pakete2(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=isaso&a=save_pakete2",
dataType: 'json',
data: 'tourID=' + tourID + "&pakete2=" + $("#pakete2_"+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)
}
});
}
</script>
{/literal}