Commit 717786dccdc35d6c46dc315b26e389fcac28eea1

Authored by 杜志良
1 parent 8d451ded

fix(cas): 修复厂家索赔确认页面材料费显示问题

src/pages/cas/ClaimConfirmation/components/DetailModal.tsx
1 1 import React, { useEffect, useState } from 'react';
2 2 import { Descriptions, Form, Input, message, Modal, Popconfirm, Select, Spin, Table } from 'antd';
3 3 import moment from 'moment';
  4 +import {isEmpty} from "lodash";
4 5 import { ColumnsType } from 'antd/es/table';
5 6  
6 7 import { formatPartCnt } from '../../utils';
... ... @@ -119,7 +120,7 @@ export default function DetailMOdal({ current, visible, setVisible, setLoading:
119 120 dataIndex: 'totalPrice',
120 121 title: '材料费',
121 122 align: 'center',
122   - render: (totalPrice: number) => rmb.p(totalPrice),
  123 + render: (totalPrice: number) => isNaN(totalPrice) ? '--' : rmb.p(totalPrice ?? 0),
123 124 },
124 125 {
125 126 dataIndex: 'partName',
... ... @@ -357,7 +358,7 @@ export default function DetailMOdal({ current, visible, setVisible, setLoading:
357 358 {(detail && detail.consultantDesc) || '--'}
358 359 </DescriptionItem>
359 360 <DescriptionItem label="附件" span={3}>
360   - <ImageModal title="查看附件" fids={detail?.fids || []} />
  361 + <ImageModal title="查看附件" fids={isEmpty(detail?.fids) ? [] : detail?.fids} />
361 362 </DescriptionItem>
362 363 </Descriptions>
363 364  
... ...