|
|
|
@ -356,8 +356,8 @@ const EnterpriseFile: React.FC<CustomerRetentionProps> = ({ customer }) => { |
|
|
|
|
const columnsHivePolicyInnerCoInsurer = [ |
|
|
|
|
{ |
|
|
|
|
title: '联保机构', |
|
|
|
|
dataIndex: 'innerCoOrgCode', |
|
|
|
|
key: 'innerCoOrgCode', |
|
|
|
|
dataIndex: 'orgName', |
|
|
|
|
key: 'orgName', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '联保份额', |
|
|
|
@ -475,18 +475,24 @@ const EnterpriseFile: React.FC<CustomerRetentionProps> = ({ customer }) => { |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
const handleCapture = () => { |
|
|
|
|
setLoading(true); |
|
|
|
|
setDownloadStat(true); |
|
|
|
|
setTimeout(function () { |
|
|
|
|
downPdf("企业档案", "main-customer-htm").then(() => { |
|
|
|
|
console.log("PDF已经生成并保存!"); |
|
|
|
|
}).catch((error: any) => { |
|
|
|
|
console.error("生成PDF时发生错误: ", error); |
|
|
|
|
}); |
|
|
|
|
setLoading(false); |
|
|
|
|
setDownloadStat(false); |
|
|
|
|
setLoading(true); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
downPdf("企业档案", "main-customer-htm") |
|
|
|
|
.then(() => { |
|
|
|
|
console.log("PDF已经生成并保存!"); |
|
|
|
|
setLoading(false); |
|
|
|
|
setDownloadStat(false); |
|
|
|
|
}) |
|
|
|
|
.catch((error: any) => { |
|
|
|
|
console.error("生成PDF时发生错误: ", error); |
|
|
|
|
setLoading(false); |
|
|
|
|
setDownloadStat(false); |
|
|
|
|
}); |
|
|
|
|
}, 7000); |
|
|
|
|
} |
|
|
|
|
// }, 200);
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div> |
|
|
|
|
<div style={{ height: 40 }}> |
|
|
|
@ -506,145 +512,158 @@ const EnterpriseFile: React.FC<CustomerRetentionProps> = ({ customer }) => { |
|
|
|
|
textAlign: 'center', |
|
|
|
|
display: 'flex', |
|
|
|
|
alignItems: 'center' |
|
|
|
|
}}>企业档案</div></div> |
|
|
|
|
}}>{customer.customerName}企业档案</div></div> |
|
|
|
|
<div> |
|
|
|
|
<Descriptions title="企业基本信息"> |
|
|
|
|
{items.map(item => ( |
|
|
|
|
<Descriptions.Item label={item.label} key={item.key}> |
|
|
|
|
{item.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<br /> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">保单信息</div> |
|
|
|
|
</div> |
|
|
|
|
{items2.map(pItem => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a', |
|
|
|
|
marginTop: 10}}> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>基本信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{pItem.baseData.map((item: { label: string, key: string, children: string }) => ( |
|
|
|
|
<Descriptions.Item label={item.label} key={item.key}> |
|
|
|
|
{item.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
<div className={downloadStat? 'asd': 'header-filter'} style={downloadStat?{}:{width: '99%', marginLeft: '0.5%'}}> |
|
|
|
|
<div className={downloadStat? 'asd': 'list-filter'} style={downloadStat?{}:{display: 'flex', padding: 7}}> |
|
|
|
|
<Descriptions title="企业基本信息"> |
|
|
|
|
{items.map(item => ( |
|
|
|
|
<Descriptions.Item label={item.label} key={item.key}> |
|
|
|
|
{item.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>责任条款</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={pItem.policyCoverageList} |
|
|
|
|
columns={columnsPolicyCoverage} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
rowKey="key" |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>联保信息</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={pItem.hivePolicyInnerCoInsurerList} |
|
|
|
|
columns={columnsHivePolicyInnerCoInsurer} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
rowKey="key" |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br /> |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
<br /> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">理赔记录</div> |
|
|
|
|
</div> |
|
|
|
|
{items3.map((item3, index) => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a'}}> |
|
|
|
|
{(index === 0 || item3[0].children !== items3[index - 1][0].children) && ( |
|
|
|
|
<div style={{ marginBottom: 20, fontWeight: 600 }}> |
|
|
|
|
保单号: {item3[0].children} |
|
|
|
|
<div className={downloadStat? 'asd': 'header-filter'} style={downloadStat?{}:{width: '99%', marginLeft: '0.5%'}}> |
|
|
|
|
<div className={downloadStat? 'asd': 'list-filter'} style={downloadStat?{}:{padding: 7}}> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">保单信息</div> |
|
|
|
|
</div> |
|
|
|
|
{items2.map(pItem => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a', |
|
|
|
|
marginTop: 10}}> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>基本信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{pItem.baseData.map((item: { label: string, key: string, children: string }) => ( |
|
|
|
|
<Descriptions.Item label={item.label} key={item.key}> |
|
|
|
|
{item.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>责任条款</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={pItem.policyCoverageList} |
|
|
|
|
columns={columnsPolicyCoverage} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
rowKey="key" |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>联保信息</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={pItem.hivePolicyInnerCoInsurerList} |
|
|
|
|
columns={columnsHivePolicyInnerCoInsurer} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
rowKey="key" |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br /> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>基本信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(1, 4).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>定损信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(5, 13).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>赔付信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(14, 24).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
<br /> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">服务记录</div> |
|
|
|
|
</div> |
|
|
|
|
{items4.map((item4, index) => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a'}}> |
|
|
|
|
<div style={{marginBottom: 20, fontWeight: 600}}>保单号: {item4.policyNumber}</div> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>事故预防服务</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.accidentPreventionList} |
|
|
|
|
columns={columnsAccidentPrevention} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
rowKey="key" |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>风险辨识</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.riskList} |
|
|
|
|
columns={columnsRisk} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>隐患排查</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.hazardInvestigationList} |
|
|
|
|
columns={columnsHazardInvestigation} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
rowKey="key" |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<div className={downloadStat? 'asd': 'header-filter'} style={downloadStat?{}:{width: '99%', marginLeft: '0.5%'}}> |
|
|
|
|
<div className={downloadStat? 'asd': 'list-filter'} style={downloadStat?{}:{padding: 7}}> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">理赔记录</div> |
|
|
|
|
</div> |
|
|
|
|
{items3.map((item3, index) => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a'}}> |
|
|
|
|
{(index === 0 || item3[0].children !== items3[index - 1][0].children) && ( |
|
|
|
|
<div style={{ marginBottom: 20, fontWeight: 600 }}> |
|
|
|
|
保单号: {item3[0].children} |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>基本信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(1, 4).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>定损信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(5, 13).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>赔付信息</div> |
|
|
|
|
<Descriptions> |
|
|
|
|
{item3.slice(14, 24).map(tim => ( |
|
|
|
|
<Descriptions.Item label={tim.title} key={tim.key}> |
|
|
|
|
{tim.children} |
|
|
|
|
</Descriptions.Item> |
|
|
|
|
))} |
|
|
|
|
</Descriptions> |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
<div className={downloadStat? 'asd': 'header-filter'} style={downloadStat?{}:{width: '99%', marginLeft: '0.5%'}}> |
|
|
|
|
<div className={downloadStat? 'asd': 'list-filter'} style={downloadStat?{}:{padding: 7}}> |
|
|
|
|
<div className="ant-descriptions-header"> |
|
|
|
|
<div className="ant-descriptions-title">服务记录</div> |
|
|
|
|
</div> |
|
|
|
|
{items4.map((item4, index) => ( |
|
|
|
|
<div style={{border: '1px solid #dce4f84a', |
|
|
|
|
borderRadius: 5, |
|
|
|
|
padding: 10, |
|
|
|
|
backgroundColor: '#dce4f84a'}}> |
|
|
|
|
<div style={{marginBottom: 20, fontWeight: 600}}>保单号: {item4.policyNumber}</div> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>事故预防服务</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.accidentPreventionList} |
|
|
|
|
columns={columnsAccidentPrevention} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
rowKey="key" |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>风险辨识</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.riskList} |
|
|
|
|
columns={columnsRisk} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
<br/> |
|
|
|
|
<div style={{marginBottom: 20, color: '#4F85EA', fontWeight: 600}}>隐患排查</div> |
|
|
|
|
<Table |
|
|
|
|
className={downloadStat ? 'special-class' : 'regular-class'} |
|
|
|
|
dataSource={item4.hazardInvestigationList} |
|
|
|
|
columns={columnsHazardInvestigation} |
|
|
|
|
bordered={true} |
|
|
|
|
size={'small'} |
|
|
|
|
scroll={{ y: 300 }} |
|
|
|
|
rowKey="key" |
|
|
|
|
pagination={false} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
))} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|