309 lines
20 KiB
Smarty
309 lines
20 KiB
Smarty
{**
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This file is licenced under the Software License Agreement.
|
|
* With the purchase or the installation of the software in your application
|
|
* you accept the licence agreement.
|
|
*
|
|
* You must not modify, adapt or create derivative works of this source code
|
|
*
|
|
* @author PrestaHelp.com
|
|
* @copyright 2020 PrestaHelp
|
|
* @license LICENSE.txt
|
|
*}
|
|
{include file=$phelpTop}
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
if ($("table .datepicker").length > 0) {
|
|
$("table .datepicker").datepicker({
|
|
prevText: '',
|
|
nextText: '',
|
|
altFormat: 'yy-mm-dd'
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<form method="post">
|
|
<div class="panel">
|
|
<div class="panel-heading"><i class="icon-cog"></i> {l s='Inpost - package list' mod='inpostship'} <span class="badge">{$allPackageCount}</span> </div>
|
|
<div class="form-horizontal">
|
|
{if empty($package_list)}
|
|
<p class="alert alert-warning">Brak przesyłek w systemie.</p>
|
|
{if !empty($filter)}
|
|
<a href="{$currentPage}" class="btn btn-primary"><i class="icon-eraser"></i> Wyczyść wynik wyszukania</a>
|
|
{/if}
|
|
{else}
|
|
{if isset($errors) && !empty($errors)}
|
|
<div class="col-lg-12">
|
|
<div class="alert alert-danger">{$errors}</div>
|
|
</div>
|
|
{/if}
|
|
{if isset($success) && !empty($success)}
|
|
<div class="col-lg-12">
|
|
<div class="alert alert-success">{$success}</div>
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="packageLists">
|
|
<table class="table tablePackageList">
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" name="all" class="selectAllCheckbox" /></th>
|
|
<th>Lp.</th>
|
|
<th>ID Przesyłki</th>
|
|
<th>
|
|
Zamówienie
|
|
{* <a class="active" href="#">*}
|
|
{* <i class="icon-caret-down"></i>*}
|
|
{* </a>*}
|
|
{* <a href="#">*}
|
|
{* <i class="icon-caret-up"></i>*}
|
|
{* </a>*}
|
|
</th>
|
|
<th>
|
|
Klient
|
|
</th>
|
|
<th>
|
|
Usługa
|
|
</th>
|
|
<th>Sposób nadania</th>
|
|
<th>Numer przesyłki</th>
|
|
<th>Status przesyłki</th>
|
|
<th>
|
|
Data utworzenia
|
|
</th>
|
|
<th></th>
|
|
<th>Status kuriera</th>
|
|
</tr>
|
|
<tr class="nodrag nodrop filter row_hover">
|
|
<th><form method="post">--</th>
|
|
<th>--</th>
|
|
<th class="text"><input type="text" class="filter" name="orderFilter_id_inpost" value="{if !empty($filter)}{$filter.orderFilter_id_inpost}{/if}"></th>
|
|
<th class="text"><input type="text" class="filter" name="orderFilter_id_order" value="{if !empty($filter)}{$filter.orderFilter_id_order}{/if}"></th>
|
|
<th class="text"><input type="text" class="filter" name="orderFilter_customer" value="{if !empty($filter)}{$filter.orderFilter_customer}{/if}"></th>
|
|
<th>
|
|
<select class="filter" onchange="$('#submitFilterButtonorder').focus();$('#submitFilterButtonorder').click();" name="orderFilter_country_usluga">
|
|
<option value="" selected="selected">-</option>
|
|
<option value="1"{if !empty($filter) && $filter.orderFilter_country_usluga == 1} selected="selected"{/if}>InPost Paczkomaty 24</option>
|
|
<option value="2"{if !empty($filter) && $filter.orderFilter_country_usluga == 2} selected="selected"{/if}>InPost Paczkomaty 24 za pobraniem</option>
|
|
<option value="3"{if !empty($filter) && $filter.orderFilter_country_usluga == 3} selected="selected"{/if}>Kurier InPost</option>
|
|
<option value="4"{if !empty($filter) && $filter.orderFilter_country_usluga == 4} selected="selected"{/if}>Kurier InPost za pobraniem</option>
|
|
<option value="5"{if !empty($filter) && $filter.orderFilter_country_usluga == 5} selected="selected"{/if}>InPost Paczkomaty 24 Paczka w weekend</option>
|
|
<option value="6"{if !empty($filter) && $filter.orderFilter_country_usluga == 6} selected="selected"{/if}>InPost Paczkomaty 24 Paczka w weekend za pobraniem</option>
|
|
<option value="7"{if !empty($filter) && $filter.orderFilter_country_usluga == 7} selected="selected"{/if}>- bd -</option>
|
|
</select>
|
|
</th>
|
|
<th>
|
|
<select class="filter" onchange="$('#submitFilterButtonorder').focus();$('#submitFilterButtonorder').click();" name="orderFilter_country_nadanie">
|
|
<option value=""{if empty($filter)} selected="selected"{/if}>-</option>
|
|
<option value="1"{if !empty($filter) && $filter.orderFilter_country_nadanie == 1} selected="selected"{/if}>Odbiór przez kuriera</option>
|
|
<option value="2"{if !empty($filter) && $filter.orderFilter_country_nadanie == 2} selected="selected"{/if}>Nadanie w paczkomacie</option>
|
|
<option value="3"{if !empty($filter) && $filter.orderFilter_country_nadanie == 3} selected="selected"{/if}>Nadam przesyłkę w Punkcie Obsługi Przesyłek</option>
|
|
</select>
|
|
</th>
|
|
<th class="text"><input type="text" class="filter" name="orderFilter_tracking" value=""></th>
|
|
<th>--</th>
|
|
<th>
|
|
{*<div class="date_range row">
|
|
<div class="input-group fixed-width-md center">
|
|
<input type="text" class="filter datepicker date-input form-control hasDatepicker" id="local_orderFilter_a__date_add_0" name="local_orderFilter_a!date_add[0]" placeholder="Od">
|
|
<input type="hidden" id="orderFilter_a__date_add_0" name="orderFilter_a!date_add[0]" value="">
|
|
<span class="input-group-addon">
|
|
<i class="icon-calendar"></i>
|
|
</span>
|
|
</div>
|
|
<div class="input-group fixed-width-md center">
|
|
<input type="text" class="filter datepicker date-input form-control hasDatepicker" id="local_orderFilter_a__date_add_1" name="local_orderFilter_a!date_add[1]" placeholder="Do">
|
|
<input type="hidden" id="orderFilter_a__date_add_1" name="orderFilter_a!date_add[1]" value="">
|
|
<span class="input-group-addon">
|
|
<i class="icon-calendar"></i>
|
|
</span>
|
|
</div>
|
|
<script>
|
|
$(function() {
|
|
var dateStart = parseDate($("#orderFilter_a__date_add_0").val());
|
|
var dateEnd = parseDate($("#orderFilter_a__date_add_1").val());
|
|
console.log(dateStart)
|
|
$("#local_orderFilter_a__date_add_0").datepicker();
|
|
// $("#local_orderFilter_a__date_add_0").datepicker("option", "altField", "#orderFilter_a__date_add_0");
|
|
// $("#local_orderFilter_a__date_add_1").datepicker("option", "altField", "#orderFilter_a__date_add_1");
|
|
if (dateStart !== null){
|
|
$("#local_orderFilter_a__date_add_0").datepicker("setDate", dateStart);
|
|
} else {
|
|
$("#local_orderFilter_a__date_add_0").datepicker();
|
|
}
|
|
if (dateEnd !== null){
|
|
$("#local_orderFilter_a__date_add_1").datepicker("setDate", dateEnd);
|
|
}
|
|
});
|
|
</script>
|
|
</div>*}
|
|
--
|
|
</th>
|
|
<th>--</th>
|
|
<th>
|
|
<span class="pull-right">
|
|
<button type="submit" id="submitFilterButtonorder" name="submitFilter" class="btn btn-default" data-list-id="order">
|
|
<i class="icon-search"></i> Szukaj
|
|
</button>
|
|
</span>
|
|
{if !empty($filter)}
|
|
<a class="btn btn-warning" href="{$currentPage}">
|
|
<i class="icon-eraser"></i> Wyczyść
|
|
</a>
|
|
{/if}
|
|
</form>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach $package_list as $pl}
|
|
<tr class="{if empty($pl.reference_number)}danger{/if}">
|
|
<td>{if !empty($pl.reference_number)}<input class="chBox" type="checkbox" name="actions[]" value="{$pl.packcode}" />{/if}</td>
|
|
<td>{$pl@iteration}.</td>
|
|
<td>{$pl.packcode}</td>
|
|
<td><a href="{$pl.order_link}" class="text-center" target="_blank">{$pl.id_order}<br />{$pl.order_ref}</a></td>
|
|
<td><a href="{$pl.customer_link}" target="_blank">{$pl.customer}</a></td>
|
|
<td>
|
|
{if $pl.service == 1}
|
|
InPost Paczkomaty 24{if $pl.c_type == 1} za pobraniem{/if}
|
|
{elseif $pl.service == 2}
|
|
Kurier InPost{if $pl.c_type == 1} za pobraniem{/if}
|
|
{elseif $pl.service == 3}
|
|
Allegro
|
|
{elseif $pl.service == 5}
|
|
InPost Paczkomaty 24 Paczka w weekend{if $pl.c_type == 1} za pobraniem{/if}
|
|
{elseif $pl.service == 6}
|
|
InPost Paczkomaty 24 Paczka w weekend{if $pl.c_type == 1} za pobraniem{/if}
|
|
{else}
|
|
- bd -
|
|
{/if}
|
|
</td>
|
|
<td>{$pl.dispatch_name}</td>
|
|
<td><a href="{$trackingUrl}{$pl.reference_number}" target="_blank">{$pl.reference_number}</a></td>
|
|
<td>{if !empty($pl.current_state)}<span data-title="{$pl.current_state.description}">{$pl.current_state.title}</span>{else} -- {/if}</td>
|
|
<td>{$pl.date_add}</td>
|
|
<td>
|
|
{if !empty($pl.reference_number)}
|
|
<a href="{$printUrl}{$pl.id_pack}" class="label-tooltip" data-toggle="tooltip" data-original-title="Drukuj etykietę" data-html="true" data-placement="top"><i class="icon-file-text"></i></a>
|
|
{if $pl.dispatch == 1 && $pl.dispatch_id == 0}
|
|
<a href="{$dispatchUrl}{$pl.packcode}" style="margin-left: 15px;" class="label-tooltip" data-toggle="tooltip" data-original-title="Zamów kuriera" data-html="true" data-placement="top"><i class="icon-truck"></i></a>
|
|
{/if}
|
|
{/if}
|
|
</td>
|
|
<td class="text-center">
|
|
{if $pl.dispatch_id > 0 && isset($pl.dispatch_status)}
|
|
<span class="protip" data-pt-title="{$pl['dispatch_status']}" title="{$pl['dispatch_status']}"><i class="material-icons">remove_red_eye</i></span>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
|
|
<button type="submit" class="btn btn-default" name="submitGenerateLabels"><i class="icon-file-text"></i> <span class="">Generuj etykiety</span></button>
|
|
{if $pn_isset}
|
|
<button type="submit" class="btn btn-default" name="submitGenerateLabelsPrint"><i class="icon-file-text"></i> <span class="">Generuj i drukuj etykiety </span> <small>(Print Node)</small></button>
|
|
{/if}
|
|
<button type="submit" class="btn btn-default" name="submitPickupDispatches" title="Tylko gdy sposób nadania to odbiór przez kuriera"><i class="icon-truck"></i> <span class="">Zamów kuriera</span></button>
|
|
<button type="submit" class="btn btn-default" name="submitGenerateDispatches" title="Możliwe tylko dla nadania poprzez odbiór przez kuriera">
|
|
<i class="icon-file-text"></i> <span class="">Generuj zlecenie odbioru</span>
|
|
</button>
|
|
<a href="{$dispatchHistoryUrl}" class="btn btn-warning pull-right">Historia zamówień kuriera</a>
|
|
</div>
|
|
|
|
<div class="paginPackageListBox">
|
|
<div class="col-lg-12">
|
|
<div class="pagination">
|
|
{l s='Display'}
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
{$selected_pagination}
|
|
<i class="icon-caret-down"></i>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
{foreach $pagination AS $value}
|
|
<li>
|
|
<a href="javascript:void(0);" class="pagination-items-page" data-items="{$value|intval}" data-list-id="1">{$value}</a>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
/ {$list_total} {l s='result(s)'}
|
|
<form method="post">
|
|
<input type="hidden" id="1-pagination-items-page" name="INPOSTSHIP_PL_PERPAGE" value="{$selected_pagination|intval}" />
|
|
</form>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$('.pagination-items-page').on('click',function(e){
|
|
e.preventDefault();
|
|
$('#'+$(this).data("list-id")+'-pagination-items-page').val($(this).data("items")).closest("form").submit();
|
|
});
|
|
</script>
|
|
<ul class="pagination pull-right">
|
|
<li {if $plPage <= 1}class="disabled"{/if}>
|
|
<a href="javascript:void(0);" class="pagination-link" data-page="1" data-list-id="1">
|
|
<i class="icon-double-angle-left"></i>
|
|
</a>
|
|
</li>
|
|
<li {if $plPage <= 1}class="disabled"{/if}>
|
|
<a href="javascript:void(0);" class="pagination-link" data-page="{$plPage - 1}" data-list-id="1">
|
|
<i class="icon-angle-left"></i>
|
|
</a>
|
|
</li>
|
|
{assign p 0}
|
|
{while $p++ < $pages_all}
|
|
{if $p < $plPage-2}
|
|
<li class="disabled">
|
|
<a href="javascript:void(0);">…</a>
|
|
</li>
|
|
{assign p $plPage-3}
|
|
{elseif $p > $plPage+2}
|
|
<li class="disabled">
|
|
<a href="javascript:void(0);">…</a>
|
|
</li>
|
|
{assign p $pages_all}
|
|
{else}
|
|
<li {if $p == $plPage}class="active"{/if}>
|
|
<a href="javascript:void(0);" class="pagination-link" data-page="{$p}" data-list-id="1">{$p}</a>
|
|
</li>
|
|
{/if}
|
|
{/while}
|
|
<li {if $plPage >= $pages_all}class="disabled"{/if}>
|
|
<a href="javascript:void(0);" class="pagination-link" data-page="{$plPage + 1}" data-list-id="1">
|
|
<i class="icon-angle-right"></i>
|
|
</a>
|
|
</li>
|
|
<li {if $plPage >= $pages_all}class="disabled"{/if}>
|
|
<a href="javascript:void(0);" class="pagination-link" data-page="{$pages_all}" data-list-id="1">
|
|
<i class="icon-double-angle-right"></i>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<form method="post">
|
|
<input type="hidden" name="plPage" value="1" id="submitFilterr1" />
|
|
<input type="hidden" name="plUrl" value="{$currentPage}" id="submitFilter1" />
|
|
</form>
|
|
<script type="text/javascript">
|
|
$('.pagination-link').on('click',function(e){
|
|
e.preventDefault();
|
|
|
|
if (!$(this).parent().hasClass('disabled'))
|
|
$('#submitFilterr'+$(this).data("list-id")).val($(this).data("page")).closest("form").submit();
|
|
});
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<p>
|
|
<br />
|
|
<span class="info-danger"><i></i> - Przesłki "błędne". Możesz przejść do szczegółów zamówienia i usunąć przesyłkę.</span>
|
|
</p>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
{$banersHtml}
|
|
|
|
{include file=$phelpBtm}
|