PersonalCard.razor 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. @page "/cardManagement/personalCard"
  2. @page "/cardManagement/personalCard/{customerId:int}"
  3. @attribute [ReuseTabsPage(Title = "个人卡")]
  4. <style>
  5. .fuel-report-container {
  6. padding: 16px;
  7. background-color: #f5f7fa;
  8. min-height: 100vh;
  9. box-sizing: border-box;
  10. overflow: hidden;
  11. }
  12. .filter-section {
  13. margin-bottom: 16px;
  14. padding: 16px !important;
  15. background: white;
  16. border: 1px solid #ebeef5;
  17. border-radius: 4px;
  18. }
  19. .filter-content .filter-row {
  20. display: flex;
  21. align-items: center;
  22. gap: 16px;
  23. flex-wrap: wrap;
  24. }
  25. .filter-content .filter-row .filter-item {
  26. display: flex;
  27. align-items: center;
  28. }
  29. .filter-content .filter-row .filter-item .filter-label {
  30. margin-right: 8px;
  31. font-size: 14px;
  32. color: #606266;
  33. min-width: 32px;
  34. }
  35. .filter-content .filter-row .filter-actions {
  36. display: flex;
  37. gap: 8px;
  38. margin-left: auto;
  39. }
  40. .table-section {
  41. margin-top: 16px;
  42. padding: 16px;
  43. background: white;
  44. border: 1px solid #ebeef5;
  45. border-radius: 4px;
  46. }
  47. /* Div表格样式 */
  48. .div-table {
  49. display: flex;
  50. flex-direction: column;
  51. border: 1px solid #ebeef5;
  52. border-radius: 4px;
  53. overflow: hidden;
  54. font-size: 14px;
  55. }
  56. .div-table-header {
  57. display: flex;
  58. background-color: #f5f7fa;
  59. font-weight: 600;
  60. color: #606266;
  61. border-bottom: 1px solid #ebeef5;
  62. }
  63. .div-table-row {
  64. display: flex;
  65. border-bottom: 1px solid #ebeef5;
  66. }
  67. .div-table-row:last-child {
  68. border-bottom: none;
  69. }
  70. .div-table-row:nth-child(even) {
  71. background-color: #fafafa;
  72. }
  73. .div-table-cell {
  74. padding: 12px 8px;
  75. text-align: center;
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. white-space: nowrap;
  79. display: flex;
  80. align-items: center;
  81. justify-content: center;
  82. }
  83. .cell-left-align {
  84. justify-content: flex-start;
  85. text-align: left;
  86. }
  87. .cell-right-align {
  88. justify-content: flex-end;
  89. text-align: right;
  90. }
  91. .highlight-cell {
  92. color: #1890ff !important;
  93. font-weight: 500;
  94. }
  95. /* 表单样式 */
  96. .filter-form {
  97. display: flex;
  98. flex-wrap: wrap;
  99. gap: 16px;
  100. }
  101. .form-item {
  102. display: flex;
  103. align-items: center;
  104. }
  105. .form-item .form-label {
  106. margin-right: 8px;
  107. font-size: 14px;
  108. color: #606266;
  109. min-width: 80px;
  110. text-align: right;
  111. }
  112. .form-actions {
  113. display: flex;
  114. gap: 8px;
  115. margin-left: auto;
  116. }
  117. /* 响应式设计 */
  118. @@media (max-width: 768px) {
  119. .fuel-report-container {
  120. padding: 12px;
  121. }
  122. .filter-section {
  123. padding: 12px !important;
  124. }
  125. .filter-form {
  126. flex-direction: column;
  127. align-items: flex-start;
  128. }
  129. .form-item {
  130. width: 100%;
  131. }
  132. .form-actions {
  133. margin-left: 0;
  134. width: 100%;
  135. display: flex;
  136. justify-content: center;
  137. margin-top: 8px;
  138. }
  139. .div-table {
  140. overflow-x: auto;
  141. }
  142. .div-table-header,
  143. .div-table-row {
  144. min-width: 1200px;
  145. }
  146. .div-table-cell {
  147. padding: 8px 4px;
  148. font-size: 12px;
  149. }
  150. }
  151. </style>
  152. <div class="fuel-report-container">
  153. <!-- 筛选条件 -->
  154. <div class="filter-section">
  155. <div class="filter-form">
  156. <!-- 卡号 -->
  157. <div class="form-item">
  158. <span class="form-label">卡号</span>
  159. <Input @bind-Value="Filter.OrderNo"
  160. Placeholder="卡号"
  161. Style="width: 150px" />
  162. </div>
  163. <!-- 会员手机号 -->
  164. <div class="form-item">
  165. <span class="form-label">会员手机号</span>
  166. <Input @bind-Value="Filter.Mobile"
  167. Placeholder="会员手机号"
  168. Style="width: 150px" />
  169. </div>
  170. <!-- 操作按钮 -->
  171. <div class="form-actions">
  172. <Button Type="@ButtonType.Primary" Icon="search" OnClick="HandleQuery">
  173. 查询
  174. </Button>
  175. <Button Icon="reload" OnClick="HandleReset">
  176. 重置
  177. </Button>
  178. </div>
  179. </div>
  180. </div>
  181. <!-- 数据表格 -->
  182. <div class="table-section">
  183. <Spin Spinning="@Loading">
  184. <div class="div-table">
  185. <!-- 表头 -->
  186. <div class="div-table-header">
  187. <div class="div-table-cell cell-left-align" style="width: 10%;">站点</div>
  188. <div class="div-table-cell cell-left-align" style="width: 15%;">用户名称</div>
  189. <div class="div-table-cell cell-left-align" style="width: 15%;">手机号</div>
  190. <div class="div-table-cell cell-left-align" style="width: 15%;">卡号</div>
  191. <div class="div-table-cell cell-left-align" style="width: 10%;">卡类型</div>
  192. <div class="div-table-cell cell-left-align" style="width: 10%;">卡账余额</div>
  193. <div class="div-table-cell cell-left-align" style="width: 15%;">发卡时间</div>
  194. <div class="div-table-cell cell-left-align" style="width: 15%;">挂失时间</div>
  195. <div class="div-table-cell cell-left-align" style="width: 10%;">状态</div>
  196. </div>
  197. <!-- 表格内容 -->
  198. @if (cardInfoDtos?.Any() == true)
  199. {
  200. @foreach (var item in cardInfoDtos)
  201. {
  202. <div class="div-table-row">
  203. <div class="div-table-cell cell-left-align" style="width: 10%;">@item.StationName</div>
  204. <div class="div-table-cell cell-left-align" style="width: 15%;">@item.CompanyName</div>
  205. <div class="div-table-cell cell-left-align" style="width: 15%;">@item.Mobile</div>
  206. <div class="div-table-cell cell-left-align" style="width: 15%;">@item.CardNo</div>
  207. <div class="div-table-cell cell-left-align" style="width: 10%;">@item.CardType</div>
  208. <div class="div-table-cell cell-left-align" style="width: 10%;">@item.AccountBalance</div>
  209. <div class="div-table-cell cell-left-align" style="width: 15%;">@item.IssueTime</div>
  210. <div class="div-table-cell cell-left-align" style="width: 15%;">@item.LossTime</div>
  211. <div class="div-table-cell cell-left-align" style="width:10%;">@item.Status</div>
  212. </div>
  213. }
  214. }
  215. else if (!Loading)
  216. {
  217. <div class="div-table-row">
  218. <div class="div-table-cell" style="width: 100%; padding: 40px; text-align: center; color: #999;">
  219. 暂无数据
  220. </div>
  221. </div>
  222. }
  223. </div>
  224. <!-- 分页 -->
  225. @if (TotalCount > 0)
  226. {
  227. <div style="margin-top: 16px; text-align: right;">
  228. <Pagination Total="@TotalCount"
  229. PageSize="@PageSize"
  230. Current="@CurrentPage"
  231. OnPageIndexChange="@OnPageChange"
  232. OnPageSizeChange="@OnPageSizeChange"
  233. ShowSizeChanger
  234. ShowQuickJumper />
  235. </div>
  236. }
  237. </Spin>
  238. </div>
  239. </div>