* Added validation to not generate more than one PackingList to the same WZ
* Added filtering when found more than one item after scanning
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
@page "/Warehouse/PackList/{WzHeader:guid}"
|
||||
@using System.Diagnostics
|
||||
@using OrdersManagement.Models
|
||||
@using Syncfusion.Blazor
|
||||
@using Syncfusion.Blazor.Cards
|
||||
@using Syncfusion.Blazor.Data
|
||||
@using Syncfusion.Blazor.Grids
|
||||
@using SytelineSaAppEfDataModel.Dtos
|
||||
@using Syncfusion.Blazor.Navigations
|
||||
@using Syncfusion.Blazor.Popups
|
||||
@using Syncfusion.Blazor.Inputs
|
||||
@using Action = System.Action
|
||||
@using FilterType = Syncfusion.Blazor.Grids.FilterType
|
||||
|
||||
@inject WarehouseService WarehouseService
|
||||
|
||||
@@ -65,7 +68,7 @@
|
||||
<GridColumn Field=@nameof(WzRowMeyleDto.OrderNumber) AllowEditing="false"
|
||||
TextAlign="TextAlign.Center" HeaderText="Numer Zamówienia Meyle"
|
||||
Width="70"></GridColumn>
|
||||
<GridColumn Field=@nameof(WzRowMeyleDto.FaIndex) AllowEditing="false"
|
||||
<GridColumn Field=@nameof(WzRowMeyleDto.FaIndex) AllowEditing="false" AllowFiltering="true"
|
||||
TextAlign="TextAlign.Center" HeaderText="Numer Indeksu FA" Width="100"></GridColumn>
|
||||
<GridColumn Field=@nameof(WzRowMeyleDto.ItemNumber) AllowEditing="false"
|
||||
TextAlign="TextAlign.Center" HeaderText="Numer Indeksu Meyle" Width="100"></GridColumn>
|
||||
@@ -299,6 +302,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
_grid.Query = null;
|
||||
_grid.ClearFilteringAsync();
|
||||
|
||||
if (materialTransactionByPartNumber != null)
|
||||
{
|
||||
SelectedRows.Clear();
|
||||
@@ -386,10 +392,10 @@
|
||||
ChangedRecords.Add(record);
|
||||
|
||||
int index = WzRowsMeyle.IndexOf(record);
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
selectedIndices.Add(index);
|
||||
Console.WriteLine($"Dodano indeks: {index}"); // Debugowanie
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,6 +403,10 @@
|
||||
SelectedRows.Clear();
|
||||
SelectedRows.AddRange(ChangedRecords);
|
||||
|
||||
SelectedRow = SelectedRows.FirstOrDefault();
|
||||
|
||||
await ApplyFilter(ChangedRecords);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -540,5 +550,9 @@
|
||||
Backtrack(0, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private async Task ApplyFilter(IList<WzRowMeyleDto> selectedRecords)
|
||||
{
|
||||
await _grid.FilterByColumnAsync(nameof(WzRowMeyleDto.FaIndex), "equal", selectedRecords.First().FaIndex);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user