120 lines
5.4 KiB
Plaintext
120 lines
5.4 KiB
Plaintext
@if (EditRecord != null)
|
|
{
|
|
<h1>EDITING</h1>
|
|
<h3>@EditRecord.OfferRowUID</h3>
|
|
@* <WebWindowConfigurator.WebWindowMaker IN_TemplateDTOList="@AvailTemplateList"
|
|
IN_SelTemplate="@SelTemplate"
|
|
EC_OnUpdate="SaveJWD"
|
|
EC_OnSelectedTemplate="SetTemplate"
|
|
LiveSVG="@currSvg">
|
|
</WebWindowConfigurator.WebWindowMaker> *@
|
|
}
|
|
else
|
|
{
|
|
<div class="card shadow">
|
|
<div class="card-header bg-info bg-opacity-50 bg-gradient d-flex justify-content-between">
|
|
<div class="px-0">Dettaglio Offerta</div>
|
|
<div class="px-0">
|
|
<button class="btn btn-sm btn-primary" @onclick="() => RecalcOffer()">Ricalcola <i class="fa-solid fa-calculator"></i></button>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="cad-body px-2">
|
|
@if (isLoading || ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info text-center fs-5">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
|
{
|
|
<th>Def</th>
|
|
<th>img</th>
|
|
}
|
|
else
|
|
{
|
|
<th>ID</th>
|
|
}
|
|
<th>Codice</th>
|
|
<th>Descrizione</th>
|
|
<th class="text-end">Qty</th>
|
|
<th class="text-end">Importo </th>
|
|
<th class="text-end">Tot</th>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
|
{
|
|
<th class="text-end" title="Cambio Materiali">Mat.</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
|
{
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
|
|
}
|
|
else
|
|
{
|
|
@item.RowNum
|
|
}
|
|
</td>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
|
{
|
|
<td>
|
|
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, item.Environment))" width="48" />
|
|
</td>
|
|
}
|
|
<td>@item.OfferRowUID</td>
|
|
<td>@item.Note</td>
|
|
<td class="text-end">@item.Qty</td>
|
|
<td class="text-end">
|
|
@if (!(item.BomOk && item.ItemOk))
|
|
{
|
|
<span class="text-danger me-2" title=""><i class="fa-solid fa-triangle-exclamation"></i></span>
|
|
}
|
|
@($"{item.Cost:C2}")
|
|
</td>
|
|
<td class="text-end fw-bold">@($"{item.TotalCost:C2}")</td>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
|
{
|
|
<td class="text-end">
|
|
@if(!string.IsNullOrEmpty(item.ItemBOM))
|
|
{
|
|
<button class="btn btn-sm btn-info" title="cambio materiali assegnati" @onclick="() => DoSwapMat(item)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
|
|
}
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
@if (showChangeMat && EditBomRecord != null)
|
|
{
|
|
<div class="modal" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" role="dialog">
|
|
<div class="modal-dialog modal-xl">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<div class="modal-title fs-4">Cambio Materiali offerta <b>@EditBomRecord.OfferRowUID</b></div>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick="ClosePopup">
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<EditBom BomList="@CurrBomList"></EditBom>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |