From 544abaa4eae8ea6c69ac20464f092de23ed1dacd Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 28 Apr 2026 11:14:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=BD=92=E8=BF=98=E7=9A=84=E5=BC=B9=E7=AA=97=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract/contract_borrows/modals/Show.tsx | 66 ++++++++++--------- .../contract_borrows/modals/Update.tsx | 12 ++-- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/pages/contract/contract_borrows/modals/Show.tsx b/src/pages/contract/contract_borrows/modals/Show.tsx index f443898..042761f 100644 --- a/src/pages/contract/contract_borrows/modals/Show.tsx +++ b/src/pages/contract/contract_borrows/modals/Show.tsx @@ -63,25 +63,30 @@ export default function Show(props: MyBetaModalFormProps) { {data?.borrow_reason} - {!data?.borrow_files || data.borrow_files.length === 0 ? ( + {!data?.contract_archive_borrow_files || + !data.contract_archive_borrow_files.length ? ( '-' ) : (
- {data.borrow_files.map((file: any, index: number) => ( -
-
- 文件 {index + 1}: {file?.file?.name} -
-
借阅数量: {file?.borrow_number}
- {/* {file?.return_status && ( + {data.contract_archive_borrow_files.map( + (file: any, index: number) => ( +
+
+ 文件 {index + 1}: + {file?.contract_archive_file?.name} +
+
借阅数量: {file?.borrow_number}
+ {/* {file?.return_status && (
归还状态:{' '} {ContractArchiveFileReturnStatusEnum[ @@ -89,20 +94,21 @@ export default function Show(props: MyBetaModalFormProps) { ]?.text || file.return_status}
)} */} - {file?.lost_number > 0 && ( -
遗失数量: {file?.lost_number}
- )} - {file?.damaged_number > 0 && ( -
损坏数量: {file?.damaged_number}
- )} - {file?.lost_description && ( -
遗失描述: {file?.lost_description}
- )} - {file?.damaged_description && ( -
损坏描述: {file?.damaged_description}
- )} -
- ))} + {file?.lost_number > 0 && ( +
遗失数量: {file?.lost_number}
+ )} + {file?.damaged_number > 0 && ( +
损坏数量: {file?.damaged_number}
+ )} + {file?.lost_description && ( +
遗失描述: {file?.lost_description}
+ )} + {file?.damaged_description && ( +
损坏描述: {file?.damaged_description}
+ )} +
+ ), + )}
)}
diff --git a/src/pages/contract/contract_borrows/modals/Update.tsx b/src/pages/contract/contract_borrows/modals/Update.tsx index d89084b..82b7934 100644 --- a/src/pages/contract/contract_borrows/modals/Update.tsx +++ b/src/pages/contract/contract_borrows/modals/Update.tsx @@ -37,11 +37,13 @@ export default function Update(props: MyBetaModalFormProps) { onOpenChange={(open: any) => { if (open && props.item) { form.setFieldsValue({ - files: props.item?.borrow_files?.map((res: any) => ({ - id: res?.id, - name: res?.file?.name, - borrow_number: res?.borrow_number, - })), + files: props.item?.contract_archive_borrow_files?.map( + (res: any) => ({ + id: res?.id, + name: res?.contract_archive_file?.name, + borrow_number: res?.borrow_number, + }), + ), }); } }} -- 2.47.2