DriverCard.razor 7.8 KB

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