2025-09-09 14:35:08 +08:00
|
|
|
import {
|
|
|
|
|
MyColumns,
|
|
|
|
|
MyPageContainer,
|
|
|
|
|
MyProTableProps,
|
|
|
|
|
usePageTabs,
|
|
|
|
|
} from '@/common';
|
|
|
|
|
import { Apis } from '@/gen/Apis';
|
|
|
|
|
import { ProTable } from '@ant-design/pro-components';
|
2025-09-25 20:20:46 +08:00
|
|
|
import { Space } from 'antd';
|
|
|
|
|
import SummaryShow from './modals/SummaryShow';
|
2025-09-09 14:35:08 +08:00
|
|
|
|
2025-09-25 20:20:46 +08:00
|
|
|
export default function Index({ title = '房屋账单' }) {
|
2025-09-09 14:35:08 +08:00
|
|
|
// 注册当前页面为标签页
|
|
|
|
|
usePageTabs({
|
2025-09-25 20:20:46 +08:00
|
|
|
tabKey: 'summary',
|
2025-09-09 14:35:08 +08:00
|
|
|
tabLabel: title,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<MyPageContainer
|
|
|
|
|
title={title}
|
|
|
|
|
enableTabs={true}
|
2025-09-25 20:20:46 +08:00
|
|
|
tabKey="summary"
|
2025-09-09 14:35:08 +08:00
|
|
|
tabLabel={title}
|
|
|
|
|
>
|
|
|
|
|
<ProTable
|
|
|
|
|
{...MyProTableProps.props}
|
|
|
|
|
request={async (params, sort) =>
|
|
|
|
|
MyProTableProps.request(
|
|
|
|
|
params,
|
|
|
|
|
sort,
|
2025-09-25 20:20:46 +08:00
|
|
|
Apis.Bill.HouseBills.SummaryBillList,
|
2025-09-09 14:35:08 +08:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
// toolBarRender={(action) => [
|
|
|
|
|
// <MyImportModal
|
|
|
|
|
// key="ImportHouse"
|
|
|
|
|
// title="批量导入"
|
|
|
|
|
// type="danger"
|
|
|
|
|
// size="middle"
|
|
|
|
|
// templateApi={Apis.Bill.HouseBills.DownloadTemplate}
|
|
|
|
|
// importApi={Apis.Bill.HouseBills.Import}
|
|
|
|
|
// reload={action?.reload}
|
|
|
|
|
// />,
|
|
|
|
|
// <BillCreate key="Create" reload={action?.reload} title={title} />,
|
|
|
|
|
// ]}
|
|
|
|
|
columns={[
|
2025-09-25 20:20:46 +08:00
|
|
|
{
|
|
|
|
|
title: '房屋ID',
|
|
|
|
|
dataIndex: 'asset_houses_id',
|
|
|
|
|
},
|
2025-09-09 14:35:08 +08:00
|
|
|
{
|
|
|
|
|
title: '房屋',
|
|
|
|
|
dataIndex: ['asset_house', 'full_name'],
|
|
|
|
|
search: {
|
|
|
|
|
transform: (value) => {
|
|
|
|
|
return { full_name: value };
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-09-25 20:20:46 +08:00
|
|
|
title: '账单金额合计',
|
|
|
|
|
dataIndex: 'payable_amount_sum',
|
|
|
|
|
search: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '滞纳金合计',
|
|
|
|
|
dataIndex: 'late_fee_sum',
|
2025-09-09 14:35:08 +08:00
|
|
|
search: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-09-25 20:20:46 +08:00
|
|
|
title: '优惠金额合计',
|
|
|
|
|
dataIndex: 'discount_amount_sum',
|
2025-09-09 14:35:08 +08:00
|
|
|
search: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-09-25 20:20:46 +08:00
|
|
|
title: '应付合计',
|
|
|
|
|
dataIndex: 'total_payable_sum',
|
2025-09-09 14:35:08 +08:00
|
|
|
search: false,
|
|
|
|
|
},
|
2025-09-25 20:20:46 +08:00
|
|
|
MyColumns.Option({
|
|
|
|
|
render: (_, item: any, index, action) => (
|
|
|
|
|
<Space key={index}>
|
|
|
|
|
<SummaryShow item={item} title="查看" reload={action?.reload} />
|
|
|
|
|
</Space>
|
|
|
|
|
),
|
|
|
|
|
}),
|
2025-09-09 14:35:08 +08:00
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</MyPageContainer>
|
|
|
|
|
);
|
|
|
|
|
}
|