Warehouses #1
@@ -130,6 +130,32 @@
|
||||
<DialogButton Content="OK" IsPrimary="true" OnClick="@HideModal"/>
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
|
||||
<SfDialog Width="500px" Title="Błąd" IsModal="true" @bind-Visible="VisibilityIndexQty"
|
||||
AllowPrerender="true">
|
||||
<DialogTemplates>
|
||||
<Content>
|
||||
<p>Nie znaleziono indeksu z ilością sztuk ('<b>@IndexWithQty</b>') odpowiadającemu skanowanym wartościom!</p>
|
||||
<p>Znaleziono indeks, który ma ilość sztuk: '<b>@IndexQty</b>'!</p>
|
||||
<p><b>Uzupełnij numer palety ręcznie i kliknij 'Zapisz'!</b></p>
|
||||
</Content>
|
||||
</DialogTemplates>
|
||||
<DialogButtons>
|
||||
<DialogButton Content="OK" IsPrimary="true" OnClick="@HideModal"/>
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
|
||||
<SfDialog Width="500px" Title="Błąd" IsModal="true" @bind-Visible="VisibilityNotFound"
|
||||
AllowPrerender="true">
|
||||
<DialogTemplates>
|
||||
<Content>
|
||||
<p>Na liście nie znaleziono skanowanego numeru partii '<b>@NotFoundItem</b>'!</p>
|
||||
</Content>
|
||||
</DialogTemplates>
|
||||
<DialogButtons>
|
||||
<DialogButton Content="OK" IsPrimary="true" OnClick="@HideModal"/>
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
<CardFooter>
|
||||
<small class="text-muted">FA Krosno Manager © @(DateTime.Now.Year)</small>
|
||||
</CardFooter>
|
||||
@@ -154,7 +180,9 @@
|
||||
private bool _isValid;
|
||||
|
||||
private bool Visibility { get; set; }
|
||||
public bool VisibilityPalletNumber { get; set; }
|
||||
private bool VisibilityPalletNumber { get; set; }
|
||||
private bool VisibilityIndexQty { get; set; }
|
||||
private bool VisibilityNotFound { get; set; }
|
||||
|
||||
private string? EmailAddresses { get; set; } = string.Empty;
|
||||
private string PalletNumber { get; set; } = "0";
|
||||
@@ -164,13 +192,22 @@
|
||||
|
||||
private bool IsDisabled => SelectedRow == null;
|
||||
|
||||
private string IndexWithQty { get; set; } = string.Empty;
|
||||
private string IndexQty { get; set; } = string.Empty;
|
||||
private string NotFoundItem { get; set; } = string.Empty;
|
||||
|
||||
private void HideModal()
|
||||
{
|
||||
Visibility = false;
|
||||
VisibilityPalletNumber = false;
|
||||
VisibilityIndexQty = false;
|
||||
VisibilityNotFound = false;
|
||||
|
||||
LastScannedValue = ScannedValue;
|
||||
ScannedValue = string.Empty;
|
||||
IndexQty = string.Empty;
|
||||
IndexWithQty = string.Empty;
|
||||
NotFoundItem = string.Empty;
|
||||
|
||||
_scanner.FocusAsync();
|
||||
}
|
||||
@@ -206,6 +243,7 @@
|
||||
}
|
||||
|
||||
await _grid.EndEditAsync();
|
||||
await _grid.ClearSelectionAsync();
|
||||
}
|
||||
|
||||
private async Task OnBatchSave(BeforeBatchSaveArgs<WzRowMarelliDto> obj)
|
||||
@@ -258,6 +296,11 @@
|
||||
SelectedRows.Clear();
|
||||
FillPalletNumber(materialTransactionByPartNumber, obj.Value.Trim());
|
||||
}
|
||||
else
|
||||
{
|
||||
NotFoundItem = ScannedValue;
|
||||
VisibilityNotFound = true;
|
||||
}
|
||||
|
||||
LastScannedValue = ScannedValue;
|
||||
ScannedValue = string.Empty;
|
||||
@@ -285,6 +328,16 @@
|
||||
|
||||
var validCombinations = FindCombinations(SelectedRows, (int?)materialTransactionByPartNumber.Quantity ?? 0);
|
||||
|
||||
if (!validCombinations.Any() && SelectedRows.Count > 0)
|
||||
{
|
||||
IndexWithQty = $"{materialTransactionByPartNumber.ItemNumber}, Qty = {materialTransactionByPartNumber.Quantity}";
|
||||
IndexQty = SelectedRows.First().Quantity.ToString() ?? "0";
|
||||
VisibilityIndexQty = true;
|
||||
|
||||
await ApplyFilter(SelectedRows);
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var combination in validCombinations)
|
||||
{
|
||||
foreach (var record in combination)
|
||||
@@ -406,7 +459,7 @@
|
||||
|
||||
private async Task ApplyFilter(IList<WzRowMarelliDto> selectedRecords)
|
||||
{
|
||||
await _grid.FilterByColumnAsync(nameof(WzRowMarelliDto.FaIndex), "equal", selectedRecords.First().FaIndex);
|
||||
await _grid.FilterByColumnAsync(nameof(WzRowMarelliDto.ItemNumber), "equal", selectedRecords.First().ItemNumber);
|
||||
}
|
||||
|
||||
private void ChangeView()
|
||||
|
||||
Reference in New Issue
Block a user