Detail.cshtml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @model economy.Models.View<economy.Models.Price.Domestic.Item.Detail.Request, economy.Models.Price.Domestic.Item.Detail.Response>
  2. @{
  3. ViewData["Title"] = "품목 가격 정보";
  4. }
  5. <div class="container">
  6. <h3>품목 가격 정보</h3>
  7. <p class="mb-0">
  8. @Model.Response.Body?.In | <small>@Model.Response.Body?.Ic</small>
  9. </p>
  10. <div class="row mt-3">
  11. <div class="col align-self-center">
  12. @((Model?.Response?.Body?.TotalCount ?? 0).ToString("N0")) 개
  13. </div>
  14. <div class="col-auto">
  15. <div class="row g-2">
  16. <div class="col">
  17. <input type="date" name="sDate" id="sDate" class="form-control" value="@Model.Request.StartDate.ToString("yyyy-MM-dd")" form="fSearch" />
  18. </div>
  19. <div class="col">
  20. <input type="date" name="eDate" id="eDate" class="form-control" value="@Model.Request.EndDate.ToString("yyyy-MM-dd")" form="fSearch" />
  21. </div>
  22. <div class="col">
  23. <select name="perPage" id="perPage" class="form-select" asp-for="SelectedListPerPage" asp-items="Model.ListPerPage" form="fSearch"></select>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="table-responsive">
  29. <table id="priceItemInfo" class="table table-bordered table-hover">
  30. <caption class="caption-top">
  31. </caption>
  32. @if (Model.Response.Body != null)
  33. {
  34. <colgroup>
  35. <col width="7%"/>
  36. <col width="10%"/>
  37. <col width="*"/>
  38. <col width="8%"/>
  39. <col width="8%"/>
  40. <col width="8%"/>
  41. <col width="10%"/>
  42. </colgroup>
  43. }
  44. <thead>
  45. <tr>
  46. <th>번호</th>
  47. <th>상품 ID</th>
  48. <th>상품 명</th>
  49. <th>판매가격</th>
  50. <th>할인가격</th>
  51. <th>혜택가격</th>
  52. <th>가격일자</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. @if (Model.Response.Body != null)
  57. {
  58. @foreach (var row in Model.Response.Body.Items.ItemList)
  59. {
  60. <tr>
  61. <td>@row.Num</td>
  62. <td>@row.Pi</td>
  63. <td class="text-start">@row.Pn</td>
  64. <td>@row.Sp.ToString("N0")</td>
  65. <td>@row.Dp.ToString("N0")</td>
  66. <td>@row.Bp</td>
  67. <td>@row.Sd</td>
  68. </tr>
  69. }
  70. }
  71. else
  72. {
  73. <tr>
  74. <td colspan="7">
  75. No data.
  76. </td>
  77. </tr>
  78. }
  79. </tbody>
  80. </table>
  81. </div>
  82. <form id="fSearch" method="get" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Price" asp-action="Detail">
  83. <input type="hidden" name="page" value="@Model.Request.PageNo"/>
  84. </form>
  85. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  86. </div>
  87. @section Scripts {
  88. <script src="~/js/price.js" asp-append-version="true"></script>
  89. }
  90. @section Styles {
  91. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true"/>
  92. }