155 lines
8.0 KiB
Plaintext
155 lines
8.0 KiB
Plaintext
@if (EditRecord != null)
|
|
{
|
|
<h1>EDITING</h1>
|
|
<h3>@EditRecord.OfferRowUID</h3>
|
|
@* <WebWindowComplex.TableComp IN_TemplateDTOList="@AvailTemplateList"
|
|
IN_SelTemplate="@SelTemplate"
|
|
EC_OnUpdate="SaveJWD"
|
|
EC_OnSelectedTemplate="SetTemplate"
|
|
LiveSVG="@currSvg">
|
|
</WebWindowComplex.TableComp> *@
|
|
@* <WebWindowComplex.TableComp CurrJwd="@EditRecord.SerStruct"
|
|
IN_TemplateDTOList="@AvailTemplateList"
|
|
IN_SelTemplate="@SelTemplate"
|
|
IN_FamilyHardwareList="@AvailFamilyHardwareList"
|
|
IN_SelFamilyHardware="@SelFamilyHardware"
|
|
IN_HardwareList="@AvailHardwareList"
|
|
IN_ColorMaterialList="@AvailColorMaterialList"
|
|
IN_SelColorMaterial="@SelColorMaterial"
|
|
IN_MaterialList="@AvailMaterialList"
|
|
IN_SelMaterial="@SelMaterial"
|
|
IN_GlassList="@AvailGlassList"
|
|
IN_SelGlass="@SelGlass"
|
|
EC_OnUpdate="SaveJWD"
|
|
LiveSVG="@currSvg">
|
|
</WebWindowComplex.TableComp> *@
|
|
}
|
|
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>
|
|
<button class="btn btn-sm btn-primary" @onclick="ForceReloadData"><i class="fa-solid fa-rotate-right"></i></button>
|
|
</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">Totale</th>
|
|
<th class="text-end">Marg.</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, nameof(item.Envir)))" width="48" />
|
|
</td>
|
|
}
|
|
<td class="small">
|
|
<div>@item.OfferRowUID</div>
|
|
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2)
|
|
{
|
|
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">BOM <i class="fa-solid fa-arrow-right-arrow-left"></i></button>
|
|
}
|
|
</td>
|
|
<td>@item.Note</td>
|
|
<td class="text-end">@item.Qty</td>
|
|
<td class="text-end text-nowrap">
|
|
<div class="fw-bold" title="Prezzo Finito">
|
|
@if (!(item.BomOk && item.ItemOk))
|
|
{
|
|
<span class="text-danger me-2" title=""><i class="fa-solid fa-triangle-exclamation"></i></span>
|
|
}
|
|
@($"{item.UnitPrice:C2}")
|
|
</div>
|
|
<div class="small text-secondary" title="RockBottom Price">(@item.UnitCost.ToString("C2"))</div>
|
|
</td>
|
|
<td class="text-end text-nowrap">
|
|
<div class="fw-bold" title="Prezzo Finito">
|
|
@($"{item.TotalPrice:C2}")
|
|
</div>
|
|
<div class="small text-secondary" title="RockBottom Price">(@item.TotalCost.ToString("C2"))</div>
|
|
</td>
|
|
<td class="text-end text-nowrap" title="Margine / Sconto MAX applicabile">
|
|
@item.MaxDiscount.ToString("P2")
|
|
</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" EC_Updated="UpdateBom"></EditBom>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |