添加提交签名接口

This commit is contained in:
xianyi
2025-12-12 16:48:10 +08:00
parent 2e62ce4a1d
commit 227e89b32b
2 changed files with 51 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ import type {
PhysicalExamSignInResponse,
InputTongyishuInfo,
TongyishuGetResponse,
InputTongyishuSignSubmit,
TongyishuSignSubmitResponse,
} from './types';
/**
@@ -126,3 +128,23 @@ export const getTongyishuPdf = (
).then(res => res.data);
};
/**
* 提交体检知情同意书签名(上传签名图片)
*/
export const submitTongyishuSign = (
data: InputTongyishuSignSubmit
): Promise<TongyishuSignSubmitResponse> => {
const formData = new FormData();
formData.append('sign_file', data.sign_file);
return request.post<TongyishuSignSubmitResponse>(
`${MEDICAL_EXAM_BASE_PATH}/tongyishu-sign-submit?exam_id=${data.exam_id}&combination_code=${data.combination_code}`,
formData,
{
headers: {
'Content-Type': 'multipart/form-data',
},
}
).then(res => res.data);
};

View File

@@ -307,3 +307,32 @@ export interface OutputTongyishuInfo {
*/
export type TongyishuGetResponse = CommonActionResult<OutputTongyishuInfo>;
/**
* 提交体检知情同意书签名入参
*/
export interface InputTongyishuSignSubmit {
/** 体检ID */
exam_id: number;
/** PDF文件组合代码 */
combination_code: number;
/** 签名图片文件 */
sign_file: File | Blob;
}
/**
* 提交体检知情同意书签名出参
*/
export interface OutputTongyishuSignInfo {
/** 体检知情同意书文件组合代码 */
combination_code?: string | null;
/** 体检知情同意书PDF地址 */
pdf_url?: string | null;
/** 消息内容 */
message?: string | null;
}
/**
* 提交体检知情同意书签名响应
*/
export type TongyishuSignSubmitResponse = CommonActionResult<OutputTongyishuSignInfo>;