Compare commits

..

No commits in common. "36c0675e292d5141f7468303a60338458cd10f17" and "e6d6129635c85ab5c8330497476d895e18bb6890" have entirely different histories.

2 changed files with 35 additions and 43 deletions

View File

@ -63,13 +63,11 @@ export default function Show(props: MyBetaModalFormProps) {
{data?.borrow_reason}
</ProDescriptions.Item>
<ProDescriptions.Item label="借阅文件" span={2}>
{!data?.contract_archive_borrow_files ||
!data.contract_archive_borrow_files.length ? (
{!data?.borrow_files || data.borrow_files.length === 0 ? (
'-'
) : (
<div>
{data.contract_archive_borrow_files.map(
(file: any, index: number) => (
{data.borrow_files.map((file: any, index: number) => (
<div
key={index}
style={{
@ -79,11 +77,8 @@ export default function Show(props: MyBetaModalFormProps) {
borderRadius: 4,
}}
>
<div
style={{ fontWeight: 'bold', marginBottom: 4 }}
>
{index + 1}:
{file?.contract_archive_file?.name}
<div style={{ fontWeight: 'bold', marginBottom: 4 }}>
{index + 1}: {file?.file?.name}
</div>
<div>: {file?.borrow_number}</div>
{/* {file?.return_status && (
@ -107,8 +102,7 @@ export default function Show(props: MyBetaModalFormProps) {
<div>: {file?.damaged_description}</div>
)}
</div>
),
)}
))}
</div>
)}
</ProDescriptions.Item>

View File

@ -37,13 +37,11 @@ export default function Update(props: MyBetaModalFormProps) {
onOpenChange={(open: any) => {
if (open && props.item) {
form.setFieldsValue({
files: props.item?.contract_archive_borrow_files?.map(
(res: any) => ({
files: props.item?.borrow_files?.map((res: any) => ({
id: res?.id,
name: res?.contract_archive_file?.name,
name: res?.file?.name,
borrow_number: res?.borrow_number,
}),
),
})),
});
}
}}