125 lines
5.7 KiB
Plaintext
125 lines
5.7 KiB
Plaintext
@page "/Items"
|
|
|
|
<div class="card shadow">
|
|
<div class="card-header">
|
|
<div class=" d-flex justify-content-between">
|
|
<div class="px-0 fs-3">
|
|
<b>Articoli</b>
|
|
</div>
|
|
<div class="px-0 d-flex justify-content-between">
|
|
<div class="px-0">
|
|
@if (!string.IsNullOrEmpty(SelCodGroup))
|
|
{
|
|
<button class="btn btn-sm btn-success" @onclick="DoAdd"><i class="fa-solid fa-cart-plus"></i> Nuovo</button>
|
|
}
|
|
</div>
|
|
<div class="px-1">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">Gruppo</span>
|
|
<select @bind="@SelCodGroup" class="form-select">
|
|
<option value="">--- Sel. Gruppo ---</option>
|
|
@foreach (var item in ListItemGroup)
|
|
{
|
|
<option value="@item.CodGroup">@item.Description</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text">Tipo</span>
|
|
<select @bind="@SelType" class="form-select">
|
|
<option value="">--- Sel. Tipo ---</option>
|
|
@foreach (var sType in Enum.GetValues(typeof(EgwCoreLib.Lux.Core.Enums.ItemClassType)))
|
|
{
|
|
<option value="@sType">@sType</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="px-1">
|
|
<div class="input-group input-group-sm" title="ricerca">
|
|
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
|
<input type="text" class="form-control" @bind="@searchVal">
|
|
<button class="btn btn-outline-secondary" @onclick="resetSearch"><i class="fas fa-ban"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (isLoading || ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
|
|
</th>
|
|
<th>ID</th>
|
|
<th>Gruppo</th>
|
|
<th>Tipo</th>
|
|
<th>Serv</th>
|
|
<th>Codice</th>
|
|
<th>ItemCode</th>
|
|
<th>Suppl.Code</th>
|
|
<th>Descrizione</th>
|
|
<th class="text-end">Costo</th>
|
|
<th class="text-end">Margine</th>
|
|
<th class="text-end">Qty min</th>
|
|
<th class="text-end">Qty Max</th>
|
|
<th class="text-end">UM</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr>
|
|
<td>
|
|
<button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
|
|
</td>
|
|
<td>@item.ItemID</td>
|
|
<td>@item.CodGroup</td>
|
|
<td>@item.ItemType</td>
|
|
<td>@item.IsService</td>
|
|
<td>@item.ItemCode</td>
|
|
<td>@item.ExtItemCode</td>
|
|
<td>@item.SupplCode</td>
|
|
<td>@item.Description</td>
|
|
<td>@item.Cost.ToString("C3")</td>
|
|
<td>@item.Margin.ToString("P1")</td>
|
|
<td>@item.QtyMin.ToString("F1")</td>
|
|
<td>@item.QtyMax.ToString("F1")</td>
|
|
<td>@item.UM</td>
|
|
<td>
|
|
@if (item.ItemType != Enums.ItemClassType.Bom)
|
|
{
|
|
<button class="btn btn-sm btn-danger" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash-can"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary disabled"><i class="fa-solid fa-trash-can"></i></button>
|
|
|
|
}
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="15">
|
|
<EgwCoreLib.Razor.DataPager currPage="@currPage" PageSize="@numRecord" totalCount="@totalCount" numPageChanged="SavePage" numRecordChanged="SaveNumRec"></EgwCoreLib.Razor.DataPager>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
}
|
|
</div>
|
|
</div> |