Add good list
This commit is contained in:
parent
50af377bf2
commit
dc48690f3e
@ -21,11 +21,11 @@ public class GoodController : Controller
|
||||
}
|
||||
|
||||
var good = await this.repository.GetGoodRegisterFromBarcode(id);
|
||||
if (good is null)
|
||||
if (good is null || good.Count == 0)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return Json(good);
|
||||
return View(good);
|
||||
}
|
||||
}
|
||||
|
||||
30
Uriagekun/Views/Good/View.cshtml
Normal file
30
Uriagekun/Views/Good/View.cshtml
Normal file
@ -0,0 +1,30 @@
|
||||
@model List<Uriagekun.Lib.Data.GoodRegisterData>
|
||||
@{
|
||||
ViewData["Title"] = $"{Model[0].Label} - 売上管理";
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<h2>@(Model[0].Label)</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-stripped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日時</th>
|
||||
<th>販売個数</th>
|
||||
<th>販売単価</th>
|
||||
<th>純利益</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach(var data in Model) {
|
||||
<tr>
|
||||
<td>@(data.Date)</td>
|
||||
<td>@(data.Count)</td>
|
||||
<td>@(data.Price)</td>
|
||||
<td>@(data.Count * data.Price)</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - 売上管理</title>
|
||||
<title>@ViewData["Title"] - うりあげくん</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/Uriagekun.styles.css" asp-append-version="true" />
|
||||
@ -25,6 +25,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Goods" asp-action="Index">商品管理</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Goods" asp-action="Register">商品登録</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Record" asp-action="Register">売上登録</a>
|
||||
</li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user