import { Badge, Descriptions } from 'kts-components-antd-x4'; import React from 'react'; import agent from '../../Server'; import { Space, Typography } from 'kts-components-antd-x4'; import { Table, Pagination, AutoTableContainer, Modal } from 'kts-xui'; interface OwnTaxV2 { department: string; legalpersonName: string; location: string; name: string; newOwnTaxBalance: string; ownTaxAmount: string; ownTaxBalance: string; personIdName: string; personIdNumber: string; publishDate: string; regType: string; taxCategory: string; taxIdNumber: string; taxpayerType: string; type: string; } interface IMeta { total?: number; pageSize?: number; pageNum?: number } const { Title, Paragraph } = Typography; export default function App(props: { id: number }) { const [list, setList] = React.useState(); const [pageMeta, setMeta] = React.useState({ pageNum: 1, pageSize: 10 }); const onPageChange = React.useCallback((pageNum, pageSize) => { const data = { ...pageMeta, pageNum, pageSize }; setMeta(data); }, []); React.useEffect(() => { if (props.id) { (async () => { const res: any = await agent.post('/web/verifierparty/risk/query-owntax', { id: props.id, pageNum: pageMeta.pageNum, pageSize: pageMeta.pageSize }, null); if (res.err) { return; } else { setList(res.res.items.map((item, index) => { return { ...item, index: (res.res.pageMeta.pageNum - 1) * res.res.pageMeta.pageSize + index + 1 } } )); setMeta(res.res.pageMeta); } })() } }, [props.id, pageMeta.pageNum, pageMeta.pageSize]) const columns = [ { title: '序号', dataIndex: 'index', width: 80, ellipsis: true, }, { title: '发布日期', dataIndex: 'publishDate', width: 120, ellipsis: true, }, { title: '纳税人识别号', dataIndex: 'taxIdNumber', width: 160, }, { title: '欠税税种', dataIndex: 'taxCategory', width: 150, }, { title: '当前新发生的欠税余额', dataIndex: 'newOwnTaxBalance', width: 140, }, { title: '欠税余额', dataIndex: 'ownTaxAmount', width: 100, }, { title: '税务机关', dataIndex: 'department', width: 140, }, { title: '操作', dataIndex: 'taxIdNumber', width: 100, render: (text, record) => { return ( { onView(record); }} >详情 ) } }]; const onView = (record) => { const _detail = record as any; Modal.info({ width: '950px', title: '欠税公告详情', okText: '关 闭', content:

{_detail?.taxpayerType} {_detail?.taxIdNumber} {_detail?.legalpersonName} {_detail?.personIdNumber} {_detail?.location} {_detail?.taxCategory} {_detail?.ownTaxAmount} {_detail?.ownTaxBalance} {_detail?.newOwnTaxBalance} {_detail?.department} {_detail?.publishDate}

, }); } return
{pageMeta && `第 ${range[0]}-${range[1]} 条, 共有 ${total} 条`} style={{ padding: '16px 0', flex: 'none', background: 'white', textAlign: 'center' }} total={pageMeta.total} pageSize={pageMeta.pageSize} current={pageMeta.pageNum} showSizeChanger={true} />} };