* Added TranslatedStatus
* Added new status * Managed CustomerOrder view
This commit is contained in:
@@ -1,12 +1,239 @@
|
|||||||
@page "/CustomerOrder/{CustomerOrderId:guid}"
|
@page "/CustomerOrder/{CustomerOrderId:guid}"
|
||||||
|
|
||||||
@inject EdiCustomerOrderService CustomerOrderService
|
@inject CustomerOrderService CustomerOrderService
|
||||||
@using SytelineSaAppEfDataModel.Dtos
|
@using SytelineSaAppEfDataModel.Dtos
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<h3>CustomerOrder</h3>
|
<h3>Zamówienie klienta nr @_customerOrder?.FirstOrDefault()?.CoNum</h3>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderDto" Data="_customerOrder" Class="bg-light">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Numer Zamówienia:</u> <b>@context.CoNum</b><br/>
|
||||||
|
<u>Numer Zamówienia Klienta:</u> <b>@context.CustPo</b><br/>
|
||||||
|
<u>Klient:</u> <b>@context.CustNum</b><br/>
|
||||||
|
<u>Numer Odbiorcy:</u> <b>@context.CustSeq</b><br/>
|
||||||
|
<u>Kontakt:</u> <b>@context.Contact</b><br/>
|
||||||
|
<u>Telefon:</u> <b>@context.Phone</b><br/>
|
||||||
|
<u>Data Zamówienia:</u> <b>@context.OrderDate.ToString("yyyy-MM-dd HH:mm:ss")</b><br/>
|
||||||
|
<u>Warunki:</u> <b>@context.TermsCode</b><br/>
|
||||||
|
<u>Wartość Brutto:</u> <b>@(context.Price?.ToString("F2") ?? "N/A")</b><br/>
|
||||||
|
<u>Status:</u> <b>@context.TranslatedStatus</b><br/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderDto" Data="_customerOrder" Class="bg-light">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Magazyn:</u> <b>@context.Whse</b><br/>
|
||||||
|
<u>VAT:</u> <b>@context.FrtTaxCode1</b><br/>
|
||||||
|
<u>Typ Odbiorcy:</u> <b>@context.EndUserType</b><br/>
|
||||||
|
<u>Kurs Wymiany:</u> <b>@(context.ExchRate?.ToString("F4") ?? "N/A")</b><br/>
|
||||||
|
<u>Gate:</u> <b>@context.Uf_FKR_EDI_Gate</b><br/>
|
||||||
|
<u>RecipientCode:</u> <b>@context.Uf_FKR_EDI_RecipientCode</b><br/>
|
||||||
|
<u>SelletCode:</u> <b>@context.Uf_FKR_EDI_SellerCode</b><br/>
|
||||||
|
<u>SenderCode:</u> <b>@context.Uf_FKR_EDI_SenderCode</b><br/>
|
||||||
|
<u>BuyerCode:</u> <b>@context.Uf_FKR_EDI_BuyerCode</b><br/>
|
||||||
|
<u>Typ Dokumentu:</u> <b>@context.Uf_DocType</b><br/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<div class="row">
|
||||||
|
<h3>Indeksy</h3>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<Grid @ref="_customerOrderLinesGrid"
|
||||||
|
TItem="CustomerOrderLineDto"
|
||||||
|
Class="table table-hover table-bordered table-striped"
|
||||||
|
Data="_customerOrderLines"
|
||||||
|
AllowFiltering="true"
|
||||||
|
Responsive="true"
|
||||||
|
AllowPaging="true"
|
||||||
|
PageSize="10"
|
||||||
|
AllowSelection="true"
|
||||||
|
AllowRowClick="true"
|
||||||
|
SelectionMode="GridSelectionMode.Single"
|
||||||
|
SelectedItemsChanged="SelectedCustomerOrderLineChanged">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Linia" PropertyName="CoLine">
|
||||||
|
@context.CoLine
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Pozycja" PropertyName="Item">
|
||||||
|
@context.Item
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Pozycja Klienta" PropertyName="CustItem">
|
||||||
|
@context.CustItem
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Opis" PropertyName="Description">
|
||||||
|
@context.Description
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Ilość" TextAlignment="Alignment.End"
|
||||||
|
PropertyName="BlanketQty">
|
||||||
|
@context.BlanketQty
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="J/M" PropertyName="UM">
|
||||||
|
@context.UM
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Cena" PropertyName="ContPrice">
|
||||||
|
@context.ContPrice
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
||||||
|
@context.TranslatedStatus
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
@if (_isVisibleCustomerOrderLine)
|
||||||
|
{
|
||||||
|
<div class="row">
|
||||||
|
<h3>Szczegóły</h3>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderLineDto" Data="_selectedCustomerOrderLine">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Numer zamówienia:</u> <b>@context.CoNum</b><br/>
|
||||||
|
<u>Linia:</u> <b>@context.CoLine</b><br/>
|
||||||
|
<u>Pozycja:</u> <b>@context.Item</b><br/>
|
||||||
|
<u>Pozycja Klienta:</u> <b>@context.CustItem</b><br/>
|
||||||
|
<u>Opis:</u> <b>@context.Description</b><br/>
|
||||||
|
<u>Łączna Ilość:</u> <b>@context.BlanketQty.ToString("F2")</b><br/>
|
||||||
|
<u>Status:</u> <b>@context.TranslatedStatus</b><br/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderLineDto" Data="_selectedCustomerOrderLine">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Cena:</u> <b>@(context.ContPrice?.ToString("F2") ?? "N/A")</b><br/>
|
||||||
|
<u>Ważne Od:</u> <b>@(context.EffDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
|
<u>J/M:</u> <b>@context.UM</b><br/>
|
||||||
|
<u>BoxType:</u> <b>@context.Uf_FKR_EDI_BLN_BoxType</b><br/>
|
||||||
|
<u>Address:</u> <b>@context.Uf_FKR_EDI_BLN_Address</b><br/>
|
||||||
|
<u>FinalDestination:</u> <b>@context.Uf_FKR_EDI_BLN_FinalDestination</b><br/>
|
||||||
|
<u>QtyPerBox:</u> <b>@(context.Uf_FKR_EDI_BLN_QtyPerBox?.ToString() ?? "N/A")</b>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<h3>Harmonogramy</h3>
|
||||||
|
<div class="row">
|
||||||
|
<Grid @ref="_customerOrderLineItemsGrid"
|
||||||
|
TItem="CustomerOrderLineItemDto"
|
||||||
|
Class="table table-hover table-bordered table-striped"
|
||||||
|
Data="_customerOrderLineItems"
|
||||||
|
AllowFiltering="true"
|
||||||
|
Responsive="true"
|
||||||
|
AllowPaging="true"
|
||||||
|
PageSize="10"
|
||||||
|
AllowSelection="true"
|
||||||
|
AllowRowClick="true"
|
||||||
|
SelectionMode="GridSelectionMode.Single"
|
||||||
|
SelectedItemsChanged="SelectedCustomerOrderLineItemChanged">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Linia" PropertyName="CustomerOrderLine">
|
||||||
|
@context.CoLine
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Zwolnienie" PropertyName="CustomerOrderRelease">
|
||||||
|
@context.CoRelease
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Pozycja" PropertyName="Item">
|
||||||
|
@context.Item
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Pozycja" PropertyName="CustomerItem">
|
||||||
|
@context.CustItem
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Łączna Ilość" TextAlignment="Alignment.End" PropertyName="QtyOrdered">
|
||||||
|
@context.QtyOrdered
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Data Wykonania" PropertyName="DueDate">
|
||||||
|
@context.DueDate?.ToString("dd.MM.yyyy")
|
||||||
|
</GridColumn>
|
||||||
|
<GridColumn TItem="CustomerOrderLineItemDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
||||||
|
@context.TranslatedStatus
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
@if (_isVisibleCustomerOrderLineItem)
|
||||||
|
{
|
||||||
|
<div class="row">
|
||||||
|
<h3>Szczegóły</h3>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderLineItemDto" Data="_selectedCustomerOrderLineItem">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Numer Zamówienia:</u> <b>@context.CoNum</b><br/>
|
||||||
|
<u>Linia:</u> <b>@context.CoLine</b><br/>
|
||||||
|
<u>Zwolnienie:</u> <b>@context.CoRelease</b><br/>
|
||||||
|
<u>Pozycja:</u> <b>@context.Item</b><br/>
|
||||||
|
<u>Pozycja Klienta:</u> <b>@context.CustItem</b><br/>
|
||||||
|
<u>Łączna Ilość Sztuk:</u> <b>@(context.QtyOrdered.ToString("F2") ?? "N/A")</b><br/>
|
||||||
|
<u>Cena:</u> <b>@(context.Price.ToString("F2") ?? "N/A")</b><br/>
|
||||||
|
<u>Data Wykonania:</u> <b>@(context.DueDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
|
<u>Data Rejestracji:</u> <b>@(context.ReleaseDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
|
<u>Magazyn:</u> <b>@context.Whse</b><br/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<SortableList TItem="CustomerOrderLineItemDto" Data="_selectedCustomerOrderLineItem">
|
||||||
|
<ItemTemplate>
|
||||||
|
<u>Kod VAT:</u> <b>@context.TaxCode1</b><br/>
|
||||||
|
<u>J/M:</u> <b>@context.UM</b><br/>
|
||||||
|
<u>Numer Klienta:</u> <b>@context.CoCustNum</b><br/>
|
||||||
|
<u>Opis:</u> <b>@context.Description</b><br/>
|
||||||
|
<u>Status:</u> <b>@context.TranslatedStatus</b><br/>
|
||||||
|
<u>RoutingCode:</u> <b>@context.Uf_FKR_EDI_ITEM_RoutingCode</b><br/>
|
||||||
|
<u>DeliveryCallNumber:</u> <b>@context.Uf_FKR_EDI_ITEM_DeliveryCallNum</b><br/>
|
||||||
|
<u>UnloadingPoint:</u> <b>@context.Uf_LOC_11_UnloadingPoint</b><br/>
|
||||||
|
<u>DestinationPoint:</u> <b>@context.Uf_LOC_159_DestinationPoint</b><br/>
|
||||||
|
<u>PalletCode:</u> <b>@context.Uf_FKR_EDI_ITEM_PalletCode</b><br/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</SortableList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter] public Guid CustomerOrderId { get; set; }
|
||||||
public Guid CustomerOrderId { get; set; }
|
|
||||||
|
List<CustomerOrderDto?>? _customerOrder { get; set; }
|
||||||
|
List<CustomerOrderLineDto> _customerOrderLines = [];
|
||||||
|
List<CustomerOrderLineItemDto> _customerOrderLineItems = [];
|
||||||
|
|
||||||
|
List<CustomerOrderLineDto?> _selectedCustomerOrderLine = [];
|
||||||
|
List<CustomerOrderLineItemDto?> _selectedCustomerOrderLineItem = [];
|
||||||
|
|
||||||
|
Grid<CustomerOrderLineDto>? _customerOrderLinesGrid;
|
||||||
|
Grid<CustomerOrderLineItemDto>? _customerOrderLineItemsGrid;
|
||||||
|
|
||||||
|
private bool _isVisibleCustomerOrderLine;
|
||||||
|
private bool _isVisibleCustomerOrderLineItem;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
CustomerOrderDto? customerOrder = await CustomerOrderService.GetCustomerOrderAsync(CustomerOrderId);
|
||||||
|
|
||||||
|
_customerOrder = [customerOrder];
|
||||||
|
_customerOrderLines = customerOrder?.CustomerOrderLines.ToList() ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectedCustomerOrderLineChanged(HashSet<CustomerOrderLineDto> obj)
|
||||||
|
{
|
||||||
|
_isVisibleCustomerOrderLine = obj.Any();
|
||||||
|
_selectedCustomerOrderLine = [obj.FirstOrDefault()];
|
||||||
|
_customerOrderLineItems = obj.FirstOrDefault()?.CustomerOrderLineItems.ToList() ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectedCustomerOrderLineItemChanged(HashSet<CustomerOrderLineItemDto> obj)
|
||||||
|
{
|
||||||
|
_isVisibleCustomerOrderLineItem = obj.Any();
|
||||||
|
_selectedCustomerOrderLineItem = [obj.FirstOrDefault()];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace SytelineSaAppEfDataModel.Dtos
|
namespace SytelineSaAppEfDataModel.Dtos
|
||||||
{
|
{
|
||||||
public class CustomerOrderDto
|
public class CustomerOrderDto : DtoBase
|
||||||
{
|
{
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public string CoNum { get; set; }
|
public string CoNum { get; set; }
|
||||||
@@ -120,6 +120,8 @@
|
|||||||
public string Uf_DocType { get; set; }
|
public string Uf_DocType { get; set; }
|
||||||
public string Uf_FKR_EDI_BuyerCode { get; set; }
|
public string Uf_FKR_EDI_BuyerCode { get; set; }
|
||||||
|
|
||||||
|
public string TranslatedStatus => TranslateStatus(Stat);
|
||||||
|
|
||||||
public IEnumerable<CustomerOrderLineDto> CustomerOrderLines { get; set; } = new List<CustomerOrderLineDto>();
|
public IEnumerable<CustomerOrderLineDto> CustomerOrderLines { get; set; } = new List<CustomerOrderLineDto>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace SytelineSaAppEfDataModel.Dtos
|
namespace SytelineSaAppEfDataModel.Dtos
|
||||||
{
|
{
|
||||||
public class CustomerOrderLineDto
|
public class CustomerOrderLineDto : DtoBase
|
||||||
{
|
{
|
||||||
public string CoNum { get; set; }
|
public string CoNum { get; set; }
|
||||||
public short CoLine { get; set; }
|
public short CoLine { get; set; }
|
||||||
@@ -51,6 +51,8 @@ namespace SytelineSaAppEfDataModel.Dtos
|
|||||||
public string Uf_FKR_EDI_BLN_FinalDestination { get; set; }
|
public string Uf_FKR_EDI_BLN_FinalDestination { get; set; }
|
||||||
public int? Uf_FKR_EDI_BLN_QtyPerBox { get; set; }
|
public int? Uf_FKR_EDI_BLN_QtyPerBox { get; set; }
|
||||||
|
|
||||||
|
public string TranslatedStatus => TranslateStatus(Stat);
|
||||||
|
|
||||||
public IEnumerable<CustomerOrderLineItemDto> CustomerOrderLineItems { get; set; } =
|
public IEnumerable<CustomerOrderLineItemDto> CustomerOrderLineItems { get; set; } =
|
||||||
new List<CustomerOrderLineItemDto>();
|
new List<CustomerOrderLineItemDto>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace SytelineSaAppEfDataModel.Dtos
|
namespace SytelineSaAppEfDataModel.Dtos
|
||||||
{
|
{
|
||||||
public class CustomerOrderLineItemDto
|
public class CustomerOrderLineItemDto : DtoBase
|
||||||
{
|
{
|
||||||
public string CoNum { get; set; }
|
public string CoNum { get; set; }
|
||||||
public short CoLine { get; set; }
|
public short CoLine { get; set; }
|
||||||
@@ -129,5 +129,7 @@ namespace SytelineSaAppEfDataModel.Dtos
|
|||||||
public string Uf_LOC_159_DestinationPoint { get; set; }
|
public string Uf_LOC_159_DestinationPoint { get; set; }
|
||||||
public string Uf_Status { get; set; }
|
public string Uf_Status { get; set; }
|
||||||
public string Uf_FKR_EDI_ITEM_PalletCode { get; set; }
|
public string Uf_FKR_EDI_ITEM_PalletCode { get; set; }
|
||||||
|
|
||||||
|
public string TranslatedStatus => TranslateStatus(Stat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"S" => "Zatrzymane",
|
"S" => "Zatrzymane",
|
||||||
"P" => "Planowane",
|
"P" => "Planowane",
|
||||||
"C" => "Zakończone",
|
"C" => "Zakończone",
|
||||||
|
"F" => "Wypełnione",
|
||||||
_ => status
|
_ => status
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user