188 lines
9.8 KiB
Plaintext
188 lines
9.8 KiB
Plaintext
@page "/Offers"
|
|
|
|
|
|
|
|
@if (EditRecord != null)
|
|
{
|
|
<div class="card shadow">
|
|
<div class="card-header">
|
|
<div class="card-title mb-0">
|
|
<div class="d-flex justify-content-between align-items-center fs-4">
|
|
<div class="px-0 fs-3">
|
|
<b>@EditRecord.OfferCode</b>
|
|
</div>
|
|
<div class="px-4">
|
|
<div class="d-flex">
|
|
<div class="px-0 row">
|
|
<div class="col px-0">
|
|
<span @onclick="() => AdvStep(CompileStep.Header)">
|
|
<StepArrow ObjId="1" StepText="Testata" BlockStyle="@(ArrowBackCol(CompileStep.Header))" StrokeWidth="4" ObjW="360" ObjH="60" StrokeColors="@listBord01" TipAngle="90" TextStyle="@txtStyle"></StepArrow>
|
|
</span>
|
|
</div>
|
|
<div class="col px-0">
|
|
<span @onclick="() => AdvStep(CompileStep.General)">
|
|
<StepArrow ObjId="2" StepText="Generale" BlockStyle="@(ArrowBackCol(CompileStep.General))" StrokeWidth="4" ObjW="360" ObjH="60" StrokeColors="@listBord01" TipAngle="90" TextStyle="@txtStyle"></StepArrow>
|
|
</span>
|
|
</div>
|
|
<div class="col px-0">
|
|
<span @onclick="() => AdvStep(CompileStep.Rows)">
|
|
<StepArrow ObjId="3" StepText="Righe" BlockStyle="@(ArrowBackCol(CompileStep.Rows))" StrokeWidth="4" ObjW="360" ObjH="60" StrokeColors="@listBord01" TipAngle="90" TextStyle="@txtStyle"></StepArrow>
|
|
</span>
|
|
</div>
|
|
<div class="col px-0">
|
|
<span @onclick="() => AdvStep(CompileStep.Delivery)">
|
|
<StepArrow ObjId="4" StepText="Consegna" BlockStyle="@(ArrowBackCol(CompileStep.Delivery))" StrokeWidth="4" ObjW="360" ObjH="60" StrokeColors="@listBord01" TipAngle="90" TextStyle="@txtStyle"></StepArrow>
|
|
</span>
|
|
</div>
|
|
<div class="col px-0">
|
|
<span @onclick="() => AdvStep(CompileStep.FinalCheck)">
|
|
<StepArrow ObjId="5" StepText="Controlli" BlockStyle="@(ArrowBackCol(CompileStep.FinalCheck))" StrokeWidth="4" ObjW="360" ObjH="60" StrokeColors="@listBord01" TipAngle="90" TextStyle="@txtStyle"></StepArrow>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="px-0">
|
|
<button type="button" class="btn-close" data-bs-dismiss="card" aria-label="Close" @onclick="DoReset">
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
@if (currStep == CompileStep.Header)
|
|
{
|
|
<OfferMan CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave"></OfferMan>
|
|
}
|
|
else if (currStep == CompileStep.General)
|
|
{
|
|
<OfferCommonPar CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave"></OfferCommonPar>
|
|
}
|
|
else if (currStep == CompileStep.Rows)
|
|
{
|
|
<OfferRowMan CurrRecord="EditRecord" DisplayMode="EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit"></OfferRowMan>
|
|
}
|
|
else if (currStep == CompileStep.Delivery)
|
|
{
|
|
<OfferDelivery CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave"></OfferDelivery>
|
|
}
|
|
else if (currStep == CompileStep.FinalCheck)
|
|
{
|
|
<OfferCheck CurrRecord="EditRecord" EC_Close="DoClose"></OfferCheck>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="card shadow">
|
|
<div class="card-header">
|
|
<div class=" d-flex justify-content-between">
|
|
<div class="px-0 fs-3">
|
|
<b>Offerte</b> <button class="btn btn-success" @onclick="DoAdd"><i class="fa-solid fa-cart-plus"></i> Nuova</button>
|
|
</div>
|
|
<div class="px-0">
|
|
Periodo | ricerca testo
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="card-body">
|
|
@if (isLoading)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="@DivMainCss">
|
|
<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>Codice</th>
|
|
<th>Agente/Riv</th>
|
|
<th>Cliente</th>
|
|
@if (SelRecord == null)
|
|
{
|
|
<th>Descrizione</th>
|
|
}
|
|
<th class="text-end"># righe</th>
|
|
<th class="text-end"># articoli</th>
|
|
<th class="text-end">Importo</th>
|
|
<th class="text-end">Marg.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="@CheckSelect(item)">
|
|
<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>
|
|
@* <button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-wand-magic"></i></button> *@
|
|
</td>
|
|
<td>@item.OfferID</td>
|
|
<td>
|
|
@item.OfferCode
|
|
<div class="small text-secondary">@item.Envir</div>
|
|
</td>
|
|
<td>
|
|
@if (item.DealerNav != null)
|
|
{
|
|
<div class=""><b>@item.DealerNav.FirstName</b> @item.DealerNav.LastName</div>
|
|
<div class="small">@item.DealerNav.VAT</div>
|
|
}
|
|
</td>
|
|
<td>
|
|
@if (item.CustomerNav != null)
|
|
{
|
|
<div class=""><b>@item.CustomerNav.FirstName</b> @item.CustomerNav.LastName</div>
|
|
<div class="small">@item.CustomerNav.VAT</div>
|
|
}
|
|
</td>
|
|
@if (SelRecord == null)
|
|
{
|
|
<td>@item.Description</td>
|
|
}
|
|
<td class="text-end">
|
|
@item.NumRows
|
|
</td>
|
|
<td class="text-end">
|
|
@item.NumItems
|
|
</td>
|
|
<td class="text-end">
|
|
<div class="fw-bold" title="Prezzo Finito">@item.TotalPrice.ToString("C2")</div>
|
|
<div class="small text-secondary" title="RockBottom Price">(@item.TotalCost.ToString("C2"))</div>
|
|
</td>
|
|
<td class="text-end" title="Margine / Sconto MAX applicabile">
|
|
@item.MaxDiscount.ToString("P2")
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
@if (SelRecord != null)
|
|
{
|
|
<div class="col-6">
|
|
<OfferRowMan CurrRecord="@SelRecord" DisplayMode="EgwCoreLib.Lux.Core.Enums.DisplayMode.Preview" EC_Updated="() => ForceReload()"></OfferRowMan>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|