fix:修复:文件归还的弹窗异常
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m2s
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m2s
This commit is contained in:
parent
bbc60fc4c2
commit
544abaa4ea
@ -63,11 +63,13 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
{data?.borrow_reason}
|
{data?.borrow_reason}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="借阅文件" span={2}>
|
<ProDescriptions.Item label="借阅文件" span={2}>
|
||||||
{!data?.borrow_files || data.borrow_files.length === 0 ? (
|
{!data?.contract_archive_borrow_files ||
|
||||||
|
!data.contract_archive_borrow_files.length ? (
|
||||||
'-'
|
'-'
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
{data.borrow_files.map((file: any, index: number) => (
|
{data.contract_archive_borrow_files.map(
|
||||||
|
(file: any, index: number) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
style={{
|
style={{
|
||||||
@ -77,8 +79,11 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ fontWeight: 'bold', marginBottom: 4 }}>
|
<div
|
||||||
文件 {index + 1}: {file?.file?.name}
|
style={{ fontWeight: 'bold', marginBottom: 4 }}
|
||||||
|
>
|
||||||
|
文件 {index + 1}:
|
||||||
|
{file?.contract_archive_file?.name}
|
||||||
</div>
|
</div>
|
||||||
<div>借阅数量: {file?.borrow_number}</div>
|
<div>借阅数量: {file?.borrow_number}</div>
|
||||||
{/* {file?.return_status && (
|
{/* {file?.return_status && (
|
||||||
@ -102,7 +107,8 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
<div>损坏描述: {file?.damaged_description}</div>
|
<div>损坏描述: {file?.damaged_description}</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
),
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
|||||||
@ -37,11 +37,13 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open && props.item) {
|
if (open && props.item) {
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
files: props.item?.borrow_files?.map((res: any) => ({
|
files: props.item?.contract_archive_borrow_files?.map(
|
||||||
|
(res: any) => ({
|
||||||
id: res?.id,
|
id: res?.id,
|
||||||
name: res?.file?.name,
|
name: res?.contract_archive_file?.name,
|
||||||
borrow_number: res?.borrow_number,
|
borrow_number: res?.borrow_number,
|
||||||
})),
|
}),
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user