diff --git a/src/api/types.ts b/src/api/types.ts index 30a890a..3c4465a 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -410,20 +410,28 @@ export interface InputAddItemBillInfo { CombinationCode: string; } +/** + * 加项单PDF文件信息 + */ +export interface OutputAddItemBillFileInfo { + /** 加项单编号 */ + pdf_sort?: number | null; + /** PDF文件名称 */ + pdf_name: string; + /** 支付状态(1-未支付 2-已支付) */ + payment_status: string; + /** 支付状态名称 (1-未支付 2-已支付) */ + payment_status_name: string; + /** PDF文件地址 */ + pdf_url: string; +} + /** * 获取体检加项单PDF出参 */ export interface OutputAddItemBillInfo { - /** 加项单编号 */ - pdf_sort?: number | null; - /** 支付状态 (1-未支付 2-已支付) */ - payment_status?: string | null; - /** 支付状态名称 (1-未支付 2-已支付) */ - payment_status_name?: string | null; - /** 加项单文件名称 */ - pdf_name?: string | null; - /** PDF文件地址 */ - pdf_url?: string | null; + /** 加项单PDF信息列表 */ + listPdfInfo: OutputAddItemBillFileInfo[]; /** 消息内容 */ message?: string | null; } diff --git a/src/components/exam/ExamAddonPanel.tsx b/src/components/exam/ExamAddonPanel.tsx index 770af64..5f2f4e9 100644 --- a/src/components/exam/ExamAddonPanel.tsx +++ b/src/components/exam/ExamAddonPanel.tsx @@ -367,8 +367,8 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => { CombinationCode: combinationItemCodes, }); - if (res.Status === 200 && res.Data?.pdf_url && res.Data?.pdf_sort !== undefined && res.Data?.pdf_sort !== null) { - + if (res.Status === 200 && res.Data?.listPdfInfo && res.Data.listPdfInfo.length > 0) { + // 新的接口返回的是数组,至少有一个PDF文件即认为成功 return true; } else { console.error('获取加项PDF失败', res.Message); @@ -743,7 +743,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {