From 092888fe192d3c19bf3e07e861713f4d90c4667f Mon Sep 17 00:00:00 2001 From: uiuJun <> Date: Thu, 9 Oct 2025 20:30:37 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BB=AA=E8=A1=A8=E8=B4=A6?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/meter/bills/index.tsx | 111 ++++++++++++++++++++++++++++++++ src/pages/meter/tasks/index.tsx | 2 +- 2 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 src/pages/meter/bills/index.tsx diff --git a/src/pages/meter/bills/index.tsx b/src/pages/meter/bills/index.tsx new file mode 100644 index 0000000..71e84fe --- /dev/null +++ b/src/pages/meter/bills/index.tsx @@ -0,0 +1,111 @@ +import { + MyButtons, + MyColumns, + MyPageContainer, + MyProTableProps, + usePageTabs, +} from '@/common'; +import { Apis } from '@/gen/Apis'; +import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums'; +import { ProTable } from '@ant-design/pro-components'; +import { useNavigate } from '@umijs/max'; +import { Space } from 'antd'; + +export default function Index({ title = '仪表账单' }) { + const navigate = useNavigate(); + + // 注册当前页面为标签页 + usePageTabs({ + tabKey: 'house_meter_bills', + tabLabel: title, + }); + + return ( + + + MyProTableProps.request( + params, + sort, + Apis.Meter.HouseMeterTaskDetails.List, + ) + } + // toolBarRender={(action) => [ + // , + // ]} + columns={[ + MyColumns.ID(), + { + title: '仪表名称', + dataIndex: ['meter_data', 'name'], + search: false, + }, + { + title: '关联房屋', + dataIndex: 'full_name', + search: false, + render: (_, record) => ( + { + navigate(`/bills/summary/show/${record.asset_houses_id}`); + }} + /> + ), + }, + MyColumns.EnumTag({ + title: '状态', + dataIndex: 'status', + valueEnum: HouseChargeTaskDetailsStatusEnum, + }), + + { + title: '收费标准', + dataIndex: ['charge_standard', 'name'], + render: (_, record) => { + return `【${record.charge_standard.id}】${record.charge_standard.name}`; + }, + search: false, + }, + { + title: '账单月份', + render: (_, record) => { + return `${record.year}-${String(record.month).padStart(2, '0')}`; + }, + search: false, + }, + { + title: '完成时间', + dataIndex: 'processed_time', + search: false, + }, + MyColumns.Option({ + render: (_, item: any, index, action) => ( + + + Apis.HouseCharage.HouseChargeTaskDetails.CreateHouseBill({ + id: item.id, + }).then(() => action?.reload()) + } + /> + + ), + }), + ]} + /> + + ); +} diff --git a/src/pages/meter/tasks/index.tsx b/src/pages/meter/tasks/index.tsx index 27ecb12..91cff32 100644 --- a/src/pages/meter/tasks/index.tsx +++ b/src/pages/meter/tasks/index.tsx @@ -15,7 +15,7 @@ import { Space } from 'antd'; import TaskCreate from './modals/TaskCreate'; import TaskShow from './modals/TaskShow'; -export default function Index({ title = '仪表账单' }) { +export default function Index({ title = '仪表任务' }) { // 注册当前页面为标签页 usePageTabs({ tabKey: 'house_meter_tasks',