| | | 1 | | @model OzonOrdersWeb.Areas.OneCFresh.ViewModels.WarehousesViewModel |
| | | 2 | | @{ |
| | 0 | 3 | | ViewData["Title"] = "Склады (Структурные единицы)"; |
| | | 4 | | } |
| | | 5 | | |
| | | 6 | | <div class="d-flex align-items-center gap-2 mb-3"> |
| | | 7 | | <h5 class="mb-0 fw-semibold"> |
| | 0 | 8 | | <i class="bi bi-building me-2 text-primary"></i>@ViewData["Title"] |
| | | 9 | | </h5> |
| | 0 | 10 | | <span class="badge bg-secondary">@Model.Items.Count</span> |
| | | 11 | | </div> |
| | | 12 | | |
| | 0 | 13 | | @if (TempData["Error"] is string err) |
| | | 14 | | { |
| | 0 | 15 | | <div class="alert alert-danger py-2 small">@err</div> |
| | | 16 | | } |
| | | 17 | | |
| | | 18 | | <form method="get" asp-area="OneCFresh" asp-controller="Catalog" asp-action="Warehouses" class="row g-2 align-items-end |
| | | 19 | | <div class="col-12 col-md-4"> |
| | | 20 | | <input class="form-control form-control-sm" name="search" value="@Model.Search" placeholder="Поиск по наименован |
| | | 21 | | </div> |
| | | 22 | | <div class="col-auto"> |
| | | 23 | | <button type="submit" class="btn btn-primary btn-sm"><i class="bi bi-search me-1"></i>Найти</button> |
| | | 24 | | </div> |
| | | 25 | | </form> |
| | | 26 | | |
| | | 27 | | <div class="table-responsive"> |
| | | 28 | | <table class="table table-sm table-hover onec-table border"> |
| | | 29 | | <thead class="table-light"> |
| | | 30 | | <tr> |
| | | 31 | | <th>Наименование</th> |
| | | 32 | | <th>GUID</th> |
| | | 33 | | <th>Статус</th> |
| | | 34 | | <th>Остатки</th> |
| | | 35 | | </tr> |
| | | 36 | | </thead> |
| | | 37 | | <tbody> |
| | 0 | 38 | | @foreach (var item in Model.Items) |
| | | 39 | | { |
| | | 40 | | <tr class="@(item.DeletionMark ? "text-muted" : "")"> |
| | 0 | 41 | | <td class="fw-semibold">@item.Description</td> |
| | 0 | 42 | | <td class="font-monospace text-muted" style="font-size:.75rem">@item.RefKey.ToString().ToUpper()</td |
| | | 43 | | <td> |
| | 0 | 44 | | @if (item.DeletionMark) |
| | | 45 | | { |
| | | 46 | | <span class="badge badge-deleted">Удалён</span> |
| | | 47 | | } |
| | | 48 | | else |
| | | 49 | | { |
| | | 50 | | <span class="badge bg-success">Активен</span> |
| | | 51 | | } |
| | | 52 | | </td> |
| | | 53 | | <td> |
| | | 54 | | <a asp-area="OneCFresh" asp-controller="Register" asp-action="Stock" |
| | 0 | 55 | | asp-route-warehouseFilter="@item.RefKey" asp-route-load="true" |
| | | 56 | | class="btn btn-outline-secondary btn-sm py-0 px-1" title="Остатки по складу"> |
| | | 57 | | <i class="bi bi-bar-chart"></i> |
| | | 58 | | </a> |
| | | 59 | | </td> |
| | | 60 | | </tr> |
| | | 61 | | } |
| | 0 | 62 | | @if (!Model.Items.Any()) |
| | | 63 | | { |
| | | 64 | | <tr><td colspan="4" class="text-center text-muted py-3">Записи не найдены</td></tr> |
| | | 65 | | } |
| | | 66 | | </tbody> |
| | | 67 | | </table> |
| | | 68 | | </div> |