|
1 | 1 | @using TscZebra.Plugin.Abstractions.Enums
|
2 |
| -@using Pl.Tablet.Models.Features.Pallets.Output |
3 |
| - |
4 | 2 | @implements IDisposable
|
5 | 3 |
|
6 | 4 | @attribute [Route($"{Routes.Create}")]
|
7 | 5 |
|
8 | 6 | <div class="size-full flex flex-col">
|
9 | 7 | <PageHeader Title="Формирование паллеты" />
|
10 | 8 | <div class="size-full max-w-screen-md mx-auto flex flex-col p-6">
|
11 |
| - <div class="w-full flex flex-col shrink-0 gap-2 pb-6"> |
12 |
| - <div class="flex flex-col border-b gap-1 pb-3 mb-3"> |
13 |
| - <h2 class="text-2xl font-semibold">Документ паллеты</h2> |
14 |
| - <h3 class="text-muted-foreground"> |
15 |
| - Отсканируйте с помощью камеры штрихкод документа паллеты или введите значение штрихкода самостоятельно |
16 |
| - </h3> |
17 |
| - </div> |
18 |
| - <InputDocumentNumber @bind-Value="@DocumentNumber" Disabled="@Pallets.Any()"/> |
19 |
| - </div> |
20 |
| - <div class="w-full flex flex-col max-h-full overflow-hidden"> |
21 |
| - <PalletDataGrid @bind-Value="Pallets" DocumentNumber="@DocumentNumber"/> |
22 |
| - </div> |
23 |
| - <div class="w-full shrink-0 flex justify-end pt-3"> |
24 |
| - <Button OnClick="@ShowCreateCompleteDialog"> |
25 |
| - Завершить |
26 |
| - </Button> |
27 |
| - </div> |
| 9 | + @if (CurrentTabIndex == 1) |
| 10 | + { |
| 11 | + <DocumentStage |
| 12 | + @bind-Value="@DocumentNumber" |
| 13 | + OnSubmitAction="@(() => CurrentTabIndex = 2)"/> |
| 14 | + } |
| 15 | + else if (CurrentTabIndex == 2) |
| 16 | + { |
| 17 | + <PalletsStage |
| 18 | + DocumentNumber="@DocumentNumber" |
| 19 | + OnSubmitAction="@ShowCreateCompleteDialog" |
| 20 | + /> |
| 21 | + } |
28 | 22 | </div>
|
29 | 23 | </div>
|
30 | 24 |
|
31 | 25 | @code {
|
32 | 26 | [Inject] private IDialogService DialogService { get; set; } = default!;
|
33 | 27 | [Inject] private IPrinterService PrinterService { get; set; } = default!;
|
34 | 28 |
|
35 |
| - private List<PalletDto> Pallets { get; set; } = []; |
| 29 | + private int CurrentTabIndex { get; set; } = 1; |
36 | 30 | private string DocumentNumber { get; set; } = string.Empty;
|
37 | 31 |
|
38 | 32 | protected override async Task OnInitializedAsync()
|
|
0 commit comments