Oil.cshtml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @model economy.Models.View<economy.Models.Price.Domestic.Oil.Request, economy.Models.Price.Domestic.Oil.Response>
  2. @{
  3. ViewData["Title"] = "석유 시세";
  4. }
  5. <div class="container">
  6. <h3>석유 시세</h3>
  7. <div class="row mt-3">
  8. <div class="col align-self-center">
  9. @((Model?.Response?.Body?.TotalCount ?? 0).ToString("N0")) 개
  10. </div>
  11. <div class="col-auto">
  12. <div class="row g-2">
  13. <div class="col">
  14. <input type="date" name="sDate" id="sDate" class="form-control" value="@Model.Request.StartDate.ToString("yyyy-MM-dd")" form="fSearch" />
  15. </div>
  16. <div class="col">
  17. <input type="date" name="eDate" id="eDate" class="form-control" value="@Model.Request.EndDate.ToString("yyyy-MM-dd")" form="fSearch" />
  18. </div>
  19. <div class="col">
  20. <select name="perPage" id="perPage" class="form-select" asp-for="SelectedListPerPage" asp-items="Model.ListPerPage" form="fSearch"></select>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. @await Html.PartialAsync("~/Views/Component/Chart.cshtml", Model.Chart)
  26. <div class="table-responsive">
  27. <table id="oilPriceInfo" class="table table-bordered table-hover">
  28. <caption class="caption-top">
  29. </caption>
  30. <thead>
  31. <tr>
  32. <th>번호</th>
  33. <th>기준일자</th>
  34. <th>유종구분</th>
  35. <th>가중평균가격 경쟁</th>
  36. <th>가중평균가격 협의</th>
  37. <th>거래량</th>
  38. <th>거래대금</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @if (Model.Response.Body != null && Model.Response.Body?.TotalCount > 0)
  43. {
  44. @foreach (var row in Model.Response.Body.Items.ItemList)
  45. {
  46. <tr>
  47. <td>@row.Num</td>
  48. <td>@row.BasDt</td>
  49. <td>@row.OilCtg</td>
  50. <td>@row.WtAvgPrcCptn</td>
  51. <td>@row.WtAvgPrcDisc</td>
  52. <td>@row.Trqu</td>
  53. <td>@row.TrPrc</td>
  54. </tr>
  55. }
  56. }
  57. else
  58. {
  59. <tr>
  60. <td colspan="11">
  61. No data.
  62. </td>
  63. </tr>
  64. }
  65. </tbody>
  66. </table>
  67. </div>
  68. <form id="fSearch" method="get" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Oil" asp-action="Index">
  69. <input type="hidden" name="page" value="@Model.Request.PageNo" />
  70. </form>
  71. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  72. </div>
  73. @section Scripts {
  74. <script src="~/js/oil.js" asp-append-version="true"></script>
  75. }
  76. @section Styles {
  77. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
  78. }