添加提交签名接口
This commit is contained in:
@@ -16,6 +16,8 @@ import type {
|
|||||||
PhysicalExamSignInResponse,
|
PhysicalExamSignInResponse,
|
||||||
InputTongyishuInfo,
|
InputTongyishuInfo,
|
||||||
TongyishuGetResponse,
|
TongyishuGetResponse,
|
||||||
|
InputTongyishuSignSubmit,
|
||||||
|
TongyishuSignSubmitResponse,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,3 +128,23 @@ export const getTongyishuPdf = (
|
|||||||
).then(res => res.data);
|
).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);
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -307,3 +307,32 @@ export interface OutputTongyishuInfo {
|
|||||||
*/
|
*/
|
||||||
export type TongyishuGetResponse = CommonActionResult<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>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user