FuelTransactionReport.razor 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. @page "/report/fuelTransactionReport"
  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="@DeviceId"
  159. Placeholder="设备编号"
  160. Style="width: 150px" />
  161. </div>
  162. <!-- 车牌号 -->
  163. <div class="form-item">
  164. <span class="form-label">车牌号</span>
  165. <Input @bind-Value="@PlateNumber"
  166. Placeholder="设备编号"
  167. Style="width: 150px" />
  168. </div>
  169. <!-- 油品 -->
  170. <div class="form-item">
  171. <span class="form-label">油品</span>
  172. <Select TItemValue="string" TItem="string"
  173. DataSource="@OilTypeOptions"
  174. @bind-Value="@OilType"
  175. Style="width: 120px"
  176. Placeholder="请选择"
  177. AllowClear />
  178. </div>
  179. <!-- 支付方式 -->
  180. <div class="form-item">
  181. <span class="form-label">支付方式</span>
  182. <Select TItemValue="string" TItem="string"
  183. DataSource="@PaymentMethodOptions"
  184. @bind-Value="@PaymentMethod"
  185. Style="width: 120px"
  186. Placeholder="请选择"
  187. AllowClear />
  188. </div>
  189. <!-- 支付状态 -->
  190. <div class="form-item">
  191. <span class="form-label">支付状态</span>
  192. <Select TItemValue="string" TItem="string"
  193. DataSource="@PaymentStatusOptions"
  194. @bind-Value="@PaymentStatus"
  195. Style="width: 120px"
  196. Placeholder="请选择"
  197. AllowClear />
  198. </div>
  199. <!-- 订单状态 -->
  200. <div class="form-item">
  201. <span class="form-label">订单状态</span>
  202. <Select TItemValue="string" TItem="string"
  203. DataSource="@OrderStatusOptions"
  204. @bind-Value="@OrderStatus"
  205. Style="width: 120px"
  206. Placeholder="请选择"
  207. AllowClear />
  208. </div>
  209. <!-- 司机 -->
  210. <div class="form-item">
  211. <span class="form-label">司机</span>
  212. <Input @bind-Value="@Driver"
  213. Placeholder="司机"
  214. Style="width: 150px" />
  215. </div>
  216. <!-- 订单编号 -->
  217. <div class="form-item">
  218. <span class="form-label">订单编号</span>
  219. <Input @bind-Value="@OrderNo"
  220. Placeholder="订单编号"
  221. Style="width: 150px" />
  222. </div>
  223. <!-- 会员手机号 -->
  224. <div class="form-item">
  225. <span class="form-label">会员手机号</span>
  226. <Input @bind-Value="@Mobile"
  227. Placeholder="会员手机号"
  228. Style="width: 150px" />
  229. </div>
  230. <!-- 交易时间 -->
  231. <div class="form-item">
  232. <span class="form-label">交易时间</span>
  233. <div style="display: flex; gap: 8px; align-items: center;">
  234. <DatePicker @bind-Value="@StartTime"
  235. Format="yyyy-MM-dd"
  236. Style="width: 110px" />
  237. <span>至</span>
  238. <DatePicker @bind-Value="@EndTime"
  239. Format="yyyy-MM-dd"
  240. Style="width: 110px"/>
  241. </div>
  242. </div>
  243. <!-- 操作按钮 -->
  244. <div class="form-actions">
  245. <Button Type="@ButtonType.Primary" Icon="search" OnClick="HandleQuery">
  246. 查询
  247. </Button>
  248. <Button Icon="reload" OnClick="HandleReset">
  249. 重置
  250. </Button>
  251. </div>
  252. </div>
  253. </div>
  254. <!-- 数据表格 -->
  255. <div class="table-section">
  256. <Spin Spinning="@Loading">
  257. <div class="div-table">
  258. <!-- 表头 -->
  259. <div class="div-table-header">
  260. <div class="div-table-cell cell-left-align" style="width: 8%;">设备编号</div>
  261. <div class="div-table-cell cell-left-align" style="width: 8%;">车牌号</div>
  262. <div class="div-table-cell cell-left-align" style="width: 10%;">交易时间</div>
  263. <div class="div-table-cell cell-left-align" style="width: 6%;">油品</div>
  264. <div class="div-table-cell cell-right-align" style="width: 6%;">单价</div>
  265. <div class="div-table-cell cell-right-align" style="width: 6%;">升数</div>
  266. <div class="div-table-cell cell-left-align" style="width: 8%;">支付方式</div>
  267. <div class="div-table-cell cell-left-align" style="width: 6%;">司机</div>
  268. <div class="div-table-cell cell-left-align" style="width: 10%;">订单编号</div>
  269. <div class="div-table-cell cell-right-align highlight-cell" style="width: 8%;">应收款</div>
  270. <div class="div-table-cell cell-left-align" style="width: 9%;">用户手机号</div>
  271. <div class="div-table-cell cell-left-align" style="width: 7%;">用户名称</div>
  272. <div class="div-table-cell cell-left-align" style="width: 8%;">微信昵称</div>
  273. <div class="div-table-cell cell-left-align" style="width: 6%;">支付状态</div>
  274. <div class="div-table-cell cell-left-align" style="width: 6%;">订单状态</div>
  275. </div>
  276. <!-- 表格内容 -->
  277. @if (TransactionData?.Any() == true)
  278. {
  279. @foreach (var item in TransactionData)
  280. {
  281. <div class="div-table-row">
  282. <div class="div-table-cell cell-left-align" style="width: 8%;">@item.DeviceId</div>
  283. <div class="div-table-cell cell-left-align" style="width: 8%;">@item.PlateNumber</div>
  284. <div class="div-table-cell cell-left-align" style="width: 10%;">@FormatDateTime(item.TransactionTime)</div>
  285. <div class="div-table-cell cell-left-align" style="width: 6%;">@item.OilProductName</div>
  286. <div class="div-table-cell cell-right-align" style="width: 6%;">@FormatCurrency(item.OilPrice)</div>
  287. <div class="div-table-cell cell-right-align" style="width: 6%;">@FormatNumber(item.OilVolume)</div>
  288. <div class="div-table-cell cell-left-align" style="width: 8%;">@item.PaymentMethod</div>
  289. <div class="div-table-cell cell-left-align" style="width: 6%;">@item.DriverName</div>
  290. <div class="div-table-cell cell-left-align" style="width: 10%;">@item.OrderNo</div>
  291. <div class="div-table-cell cell-right-align highlight-cell" style="width: 8%;">@FormatCurrency(item.PayableAmount)</div>
  292. <div class="div-table-cell cell-left-align" style="width: 9%;">@item.Mobile</div>
  293. <div class="div-table-cell cell-left-align" style="width: 7%;">@item.UserName</div>
  294. <div class="div-table-cell cell-left-align" style="width: 8%;">@item.WxName</div>
  295. <div class="div-table-cell cell-left-align" style="width: 6%;">@item.PaymentStatus</div>
  296. <div class="div-table-cell cell-left-align" style="width: 6%;">@FormatOrderStatus(item.OrderStatus)</div>
  297. </div>
  298. }
  299. }
  300. else if (!Loading)
  301. {
  302. <div class="div-table-row">
  303. <div class="div-table-cell" style="width: 100%; padding: 40px; text-align: center; color: #999;">
  304. 暂无数据
  305. </div>
  306. </div>
  307. }
  308. </div>
  309. <!-- 分页 -->
  310. @if (TotalCount > 0)
  311. {
  312. <div style="margin-top: 16px; text-align: right;">
  313. <Pagination Total="@TotalCount"
  314. PageSize="@PageSize"
  315. Current="@CurrentPage"
  316. OnChange="@HandlePageChange"
  317. OnShowSizeChange="@HandlePageSizeChange"
  318. ShowSizeChanger
  319. ShowQuickJumper />
  320. </div>
  321. }
  322. </Spin>
  323. </div>
  324. </div>