pay-admin/src/pages/order/index.tsx

136 lines
3.7 KiB
TypeScript
Raw Normal View History

import {
MyColumns,
MyPageContainer,
MyProTableProps,
usePageTabs,
} from '@/common';
import { Apis } from '@/gen/Apis';
import {
HouseOrdersOrderStatusEnum,
HouseOrdersPaymentMethodEnum,
} from '@/gen/Enums';
import { ProTable } from '@ant-design/pro-components';
export default function Index({ title = '支付明细' }) {
// 注册当前页面为标签页
usePageTabs({
tabKey: 'house_order',
tabLabel: title,
});
return (
<MyPageContainer
title={title}
enableTabs={true}
tabKey="house_order"
tabLabel={title}
>
<ProTable
{...MyProTableProps.props}
request={async (params, sort) =>
MyProTableProps.request(
params,
sort,
Apis.HouseOrder.HouseOrders.List,
)
}
// 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
// MyColumns.ID(),
{
title: '订单号',
dataIndex: 'order_code',
search: false,
},
MyColumns.EnumTag({
title: '支付方式',
dataIndex: 'payment_method',
valueEnum: HouseOrdersPaymentMethodEnum,
}),
MyColumns.EnumTag({
title: '支付状态',
dataIndex: 'order_status',
valueEnum: HouseOrdersOrderStatusEnum,
}),
2025-09-25 20:20:46 +08:00
// {
// title: '支付单号',
// dataIndex: 'payment_no',
// search: false,
// },
{
2025-09-25 20:20:46 +08:00
title: '应收金额',
dataIndex: 'actual_paid_amount',
search: false,
},
{
2025-09-25 20:20:46 +08:00
title: '滞纳金',
dataIndex: 'late_fee',
search: false,
},
{
2025-09-25 20:20:46 +08:00
title: '退款总金额',
dataIndex: 'refund_amount',
search: false,
},
{
2025-09-25 20:20:46 +08:00
title: '实缴金额',
dataIndex: 'actual_paid_amount',
search: false,
},
{
2025-09-25 20:20:46 +08:00
title: '收款账号',
dataIndex: ['house_order_items', 'receipt_account'],
render: (text, item) =>
`${
item?.receipt_account?.company_bank
} ${item?.receipt_account?.company_account?.slice(-4)}`,
},
{
2025-09-25 20:20:46 +08:00
title: '支付时间',
dataIndex: 'paid_time',
search: false,
},
{
title: '关联机构',
dataIndex: ['company', 'name'],
search: false,
},
2025-09-25 20:20:46 +08:00
{
title: '关联项目',
dataIndex: ['asset_project', 'name'],
search: false,
},
// MyColumns.CreatedAt(),
// MyColumns.Option({
// render: (_, item: any, index, action) => (
// <Space key={index}>
// <BillUpdate item={item} reload={action?.reload} title={title} />
// <MyButtons.Delete
// onConfirm={() =>
// Apis.Common.Admins.Delete({ id: item.id }).then(() =>
// action?.reload(),
// )
// }
// />
// </Space>
// ),
// }),
]}
/>
</MyPageContainer>
);
}