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.
72 lines
4.3 KiB
72 lines
4.3 KiB
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; |
|
import { PageContainer, ProDescriptions } from '@ant-design/pro-components'; |
|
import { CardDetail, DescriptionsDetail, PreviewFile } from '@component/ui'; |
|
import { dateFormatter, formatImageUrl, useRoutes } from '@component/utils'; |
|
import React, { useState } from 'react'; |
|
import { useRequest } from 'ahooks'; |
|
import { getServiceDetail } from './action'; |
|
import RiskControl from './risk.control'; |
|
import { Divider } from 'antd'; |
|
import HiddenInformation from './hidden.information'; |
|
export default function (props) { |
|
return (_jsx(PageContainer, Object.assign({ header: { |
|
title: null, |
|
} }, { children: _jsx("div", Object.assign({ className: "page-content-detail" }, { children: _jsx(ExpertReportDetail, Object.assign({}, props)) })) }))); |
|
} |
|
export function ExpertReportDetail({ type, poltform }) { |
|
const { paramsParse } = useRoutes(); |
|
const { serviceId = null } = paramsParse; |
|
const [riskIds, setRiskIds] = useState([]); |
|
const [hiddenIds, setHiddenIds] = useState([]); |
|
const readonly = serviceId && type == 'detail'; |
|
const { data = {}, loading } = useRequest(getServiceDetail, { |
|
defaultParams: { |
|
serviceId: serviceId, |
|
}, |
|
}); |
|
const desColum = React.useMemo(() => [ |
|
{ |
|
title: '保单号', |
|
key: 'policyNumber', |
|
dataIndex: 'policyNumber', |
|
}, |
|
{ |
|
title: '服务标准类别', |
|
key: 'aqServiceName', |
|
dataIndex: 'aqServiceName', |
|
}, |
|
{ |
|
title: '服务机构', |
|
key: 'executedOrganName', |
|
hideInDescriptions: poltform == 'expert', |
|
dataIndex: 'executedOrganName', |
|
}, |
|
{ |
|
title: '服务专家', |
|
key: 'userName', |
|
dataIndex: 'userName', |
|
}, |
|
{ |
|
title: '客户名称', |
|
key: 'customerName', |
|
dataIndex: 'customerName', |
|
}, |
|
{ |
|
title: '服务地址', |
|
key: 'address', |
|
dataIndex: 'address', |
|
}, |
|
{ |
|
title: '服务日期', |
|
key: 'serviceStartAt', |
|
dataIndex: 'serviceStartAt', |
|
renderText: dateFormatter, |
|
}, |
|
{ |
|
title: '实际支付金额(元)', |
|
key: 'actualServiceCost', |
|
dataIndex: 'actualServiceCost', |
|
}, |
|
], [data]); |
|
return _jsxs(_Fragment, { children: [_jsx(CardDetail, Object.assign({ title: "\u57FA\u672C\u4FE1\u606F", loading: loading }, { children: _jsxs(DescriptionsDetail, Object.assign({ dataSource: data, layout: "horizontal", column: 2, columns: desColum }, { children: [(poltform == 'expert') && _jsx(ProDescriptions.Item, {}), _jsx(ProDescriptions.Item, Object.assign({ label: '\u670D\u52A1\u5185\u5BB9\u7B80\u8FF0', span: 2 }, { children: data === null || data === void 0 ? void 0 : data.serviceContent })), _jsx(ProDescriptions.Item, Object.assign({ label: '\u5907\u6CE8', span: 2 }, { children: data === null || data === void 0 ? void 0 : data.remark }))] })) })), _jsx(Divider, { className: "self-pro-divider-form" }), _jsx(RiskControl, { title: "\u98CE\u9669\u8BC4\u4F30\u53CA\u7BA1\u63A7", serviceId: serviceId, setRiskIds: setRiskIds, readonly: readonly, type: type }), _jsx(Divider, { className: "self-pro-divider-form" }), _jsx(HiddenInformation, { title: "\u73B0\u573A\u4E8B\u6545\u9690\u60A3\u4FE1\u606F", serviceId: serviceId, setHiddenIds: setHiddenIds, readonly: readonly, type: type }), _jsx(Divider, { className: "self-pro-divider-form" }), _jsx(CardDetail, Object.assign({ title: "\u57FA\u672C\u4FE1\u606F", loading: loading }, { children: _jsxs(DescriptionsDetail, Object.assign({ layout: "horizontal", column: 2 }, { children: [_jsx(ProDescriptions.Item, Object.assign({ label: "\u62A5\u544A\u5185\u5BB9\u6587\u4EF6" }, { children: _jsx(PreviewFile, { disabled: true, listType: "picture-card", fileList: formatImageUrl(data === null || data === void 0 ? void 0 : data.serviceReportUrl) }) })), _jsx(ProDescriptions.Item, Object.assign({ label: "\u670D\u52A1\u76F8\u5173\u9644\u4EF6" }, { children: _jsx(PreviewFile, { disabled: true, listType: "picture-card", fileList: formatImageUrl(data === null || data === void 0 ? void 0 : data.serviceResultsAtts) }) }))] })) }))] }); |
|
}
|
|
|