From 9c2dc49d8dffd3205c89463f456976fbbc9cbc39 Mon Sep 17 00:00:00 2001 From: cst Date: Mon, 27 Jul 2026 14:56:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/finance/payments/index.module.less | 46 ++++ src/pages/finance/payments/index.tsx | 106 ++++++++- .../payments/model/usePaymentsModel.ts | 201 ++++++++++++++++++ 3 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 src/pages/finance/payments/index.module.less create mode 100644 src/pages/finance/payments/model/usePaymentsModel.ts diff --git a/src/pages/finance/payments/index.module.less b/src/pages/finance/payments/index.module.less new file mode 100644 index 0000000..38ddafa --- /dev/null +++ b/src/pages/finance/payments/index.module.less @@ -0,0 +1,46 @@ +// ===== 汇总(按图片:左对齐两段加粗数字) ===== +.summary { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 0 32px; + flex-shrink: 0; + padding: 14px 15px; + background: #fff; + border-radius: 8px; + font-size: 14px; + color: rgba(0, 0, 0, 0.85); +} + +.summaryItem { + display: inline-flex; + align-items: baseline; +} + +.summaryLabel { + color: rgba(0, 0, 0, 0.65); +} + +.summaryValue { + font-weight: 600; + color: rgba(0, 0, 0, 0.85); + letter-spacing: 0.3px; + font-family: + -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; +} + +// ===== 表格 body 容器:占满 flex 剩余空间 ===== +.tableBody { + flex: 1; + min-height: 0; + overflow: hidden; + + :global { + .ant-spin-nested-loading, + .ant-spin-container, + .ant-table, + .ant-table-container { + height: 100%; + } + } +} diff --git a/src/pages/finance/payments/index.tsx b/src/pages/finance/payments/index.tsx index d61e398..bb354fc 100644 --- a/src/pages/finance/payments/index.tsx +++ b/src/pages/finance/payments/index.tsx @@ -1,4 +1,10 @@ import { defineComponent } from 'vue'; +import { Button, Input, Table, Form, Space, Pagination, Select, DatePicker } from 'ant-design-vue'; +import { usePaymentsModel } from './model/usePaymentsModel'; +import { useContainerSize } from '@/hooks'; +import styles from './index.module.less'; + +const { RangePicker } = DatePicker; /** * 支付流水 @@ -6,9 +12,107 @@ import { defineComponent } from 'vue'; export default defineComponent({ name: 'FinancePayments', setup() { + const { + filterForm, + loading, + dataSource, + columns, + summary, + pagination, + handleSearch, + handleReset, + handlePageChange, + PAYMENT_TYPE_OPTIONS, + } = usePaymentsModel(); + + const { containerRef, height } = useContainerSize({ headerOffset: 55 }); + return () => (
-
支付流水 - 开发中
+ {/* ===== 筛选区 ===== */} +
+
+ + (filterForm.timeRange = val)} + /> + + + + + + + + +