You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

81 lines
2.5 KiB

import { jsx as _jsx } from "react/jsx-runtime";
import { ProTable } from '@ant-design/pro-components';
import { getPolicyPageList } from './action';
import React, { useMemo } from 'react';
import { urlEncodeParams, useRoutes } from '@component/utils';
import { Link } from 'react-router-dom';
export default function ({ policyUrl }) {
const { paramsParse } = useRoutes();
const columns = useMemo(() => [
{
title: '保单号',
dataIndex: 'policyNumber',
ellipsis: true,
search: false,
},
{
title: '产品代码',
dataIndex: 'productCode',
ellipsis: true,
search: false,
},
{
title: '投保人',
dataIndex: 'insurCustomerName',
ellipsis: true,
search: false,
},
{
title: '被保人',
dataIndex: 'customerName',
ellipsis: true,
search: false,
},
{
title: '保费(元)',
dataIndex: 'duePremium',
ellipsis: true,
search: false,
},
{
title: '起保日期',
dataIndex: 'startDate',
ellipsis: true,
search: false,
},
{
title: '终保日期',
dataIndex: 'doneDate',
ellipsis: true,
search: false,
},
{
title: '保单状态',
dataIndex: 'policyStatus',
ellipsis: true,
search: false,
valueEnum: {
2: { text: '已生效' },
3: { text: '已退保' },
4: { text: '核保通过' },
275: { text: '已注销' },
},
},
{
title: '操作',
valueType: 'option',
ellipsis: true,
search: false,
fixed: 'right',
render: (text, record) => [
_jsx(Link, Object.assign({ to: `${policyUrl}${urlEncodeParams({
policyNumber: record === null || record === void 0 ? void 0 : record.policyNumber,
})}` }, { children: "\u8BE6\u60C5" })),
],
},
]);
return (_jsx(ProTable, { columns: columns, request: getPolicyPageList, rowKey: "userId", toolBarRender: false, search: false, params: paramsParse, pagination: {
pageSize: 10,
showSizeChanger: false,
} }));
}