Flower.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @model economy.Models.View<economy.Models.Price.Domestic.Flower.Request, economy.Models.Price.Domestic.Flower.Response>
  2. @{
  3. ViewData["Title"] = "화훼 시세";
  4. }
  5. <div class="container">
  6. <h3>화훼 시세</h3>
  7. <div class="row g-2 mt-3">
  8. <div class="col-sm col-md-auto">
  9. <input type="search" name="pName" id="pName" class="form-control" value="@Model.Request.PumName" form="fSearch" placeholder="품목명" />
  10. </div>
  11. <div class="col-sm col-md-auto">
  12. <input type="search" name="gName" id="gName" class="form-control" value="@Model.Request.GoodName" form="fSearch" placeholder="품종명" />
  13. </div>
  14. <div class="col col-md-auto text-center text-md-start">
  15. <button type="submit" class="btn btn-secondary" form="fSearch">검색</button>
  16. </div>
  17. </div>
  18. <div class="row mt-3">
  19. <div class="col align-self-center">
  20. @((Model?.Response?.NumberOfRows ?? 0).ToString("N0")) 개
  21. </div>
  22. <div class="col-auto">
  23. <div class="row g-2">
  24. <div class="col">
  25. <input type="date" name="date" id="date" class="form-control" value="@Model.Request.BaseDate.ToString("yyyy-MM-dd")" form="fSearch" />
  26. </div>
  27. <div class="col">
  28. <select name="perPage" id="perPage" class="form-select" asp-for="SelectedListPerPage" asp-items="Model.ListPerPage" form="fSearch"></select>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="table-responsive">
  34. <table id="flowerPrice" class="table table-bordered table-hover">
  35. <caption class="caption-top">
  36. 총금액 단위:원 / 총물량 단위:속
  37. </caption>
  38. <thead>
  39. <tr>
  40. <th>번호</th>
  41. <th>기준일자</th>
  42. <th>부류</th>
  43. <th>품목명</th>
  44. <th>품종명</th>
  45. <th>등급명</th>
  46. <th>최고가</th>
  47. <th>최저가</th>
  48. <th>평균가</th>
  49. <th>총금액</th>
  50. <th>총물량</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @if (Model.Response.Items != null && Model.Response?.NumberOfRows > 0)
  55. {
  56. @foreach (var row in Model.Response.Items)
  57. {
  58. <tr>
  59. <td>@row.Num</td>
  60. <td>@row.SaleDate</td>
  61. <td>@row.FlowerGubn</td>
  62. <td>@row.PumName</td>
  63. <td>@row.GoodName</td>
  64. <td>@row.LvNm</td>
  65. <td>@row.MaxAmt</td>
  66. <td>@row.MinAmt</td>
  67. <td>@row.AvgAmt</td>
  68. <td>@row.TotAmt</td>
  69. <td>@row.TotQty</td>
  70. </tr>
  71. }
  72. }
  73. else
  74. {
  75. <tr>
  76. <td colspan="11">
  77. No data.
  78. </td>
  79. </tr>
  80. }
  81. </tbody>
  82. </table>
  83. </div>
  84. <form id="fSearch" method="get" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Flower" asp-action="Index">
  85. <input type="hidden" name="page" value="@Model.Request.PageNo" />
  86. </form>
  87. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  88. </div>
  89. @section Scripts {
  90. <script src="~/js/flower.js" asp-append-version="true"></script>
  91. }
  92. @section Styles {
  93. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
  94. }