完善加项支付
This commit is contained in:
@@ -22,6 +22,8 @@ import type {
|
||||
DaojiandanGetResponse,
|
||||
InputDaojiandanSignSubmit,
|
||||
DaojiandanSignSubmitResponse,
|
||||
InputAddItemBillSignSubmit,
|
||||
AddItemBillSignSubmitResponse,
|
||||
InputDaojiandanPrintStatus,
|
||||
DaojiandanPrintStatusResponse,
|
||||
InputCustomerDetailEdit,
|
||||
@@ -156,7 +158,7 @@ export const signInMedicalExamCenter = (
|
||||
): Promise<PhysicalExamSignInResponse> => {
|
||||
const formData = new FormData();
|
||||
formData.append('id_no_pic', data.id_no_pic);
|
||||
|
||||
|
||||
return request.post<PhysicalExamSignInResponse>(
|
||||
`${MEDICAL_EXAM_BASE_PATH}/sign-in`,
|
||||
formData,
|
||||
@@ -188,7 +190,7 @@ export const submitTongyishuSign = (
|
||||
): 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,
|
||||
@@ -292,7 +294,7 @@ export const submitDaojiandanSign = (
|
||||
): Promise<DaojiandanSignSubmitResponse> => {
|
||||
const formData = new FormData();
|
||||
formData.append('sign_file', data.sign_file);
|
||||
|
||||
|
||||
return request.post<DaojiandanSignSubmitResponse>(
|
||||
`${MEDICAL_EXAM_BASE_PATH}/daojiandan-sign-submit?exam_id=${data.exam_id}`,
|
||||
formData,
|
||||
@@ -304,6 +306,26 @@ export const submitDaojiandanSign = (
|
||||
).then(res => res.data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 提交体检加项单签名生成PDF
|
||||
*/
|
||||
export const submitAddItemBillSign = (
|
||||
data: InputAddItemBillSignSubmit
|
||||
): Promise<AddItemBillSignSubmitResponse> => {
|
||||
const formData = new FormData();
|
||||
formData.append('sign_file', data.sign_file);
|
||||
|
||||
return request.post<AddItemBillSignSubmitResponse>(
|
||||
`${MEDICAL_EXAM_BASE_PATH}/add-item-bill-sign-submit?exam_id=${data.exam_id}`,
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
}
|
||||
).then(res => res.data);
|
||||
};
|
||||
|
||||
/**
|
||||
* 体检导检单打印状态修改
|
||||
*/
|
||||
@@ -408,15 +430,15 @@ export const getUserOwnedMenus = (
|
||||
data: InputUserOwnedMenus
|
||||
): Promise<UserOwnedMenusResponse> => {
|
||||
// 从 localStorage 获取 accessToken
|
||||
const accessToken = typeof window !== 'undefined'
|
||||
? localStorage.getItem('accessToken')
|
||||
const accessToken = typeof window !== 'undefined'
|
||||
? localStorage.getItem('accessToken')
|
||||
: null;
|
||||
|
||||
|
||||
const headers: Record<string, string> = {};
|
||||
if (accessToken) {
|
||||
headers.Authorization = `Bearer ${accessToken}`;
|
||||
}
|
||||
|
||||
|
||||
return request.post<UserOwnedMenusResponse>(
|
||||
`/api/auth/user/owned/menus`,
|
||||
data,
|
||||
|
||||
@@ -400,6 +400,33 @@ export interface OutputDaojiandanSignInfo {
|
||||
*/
|
||||
export type DaojiandanSignSubmitResponse = CommonActionResult<OutputDaojiandanSignInfo>;
|
||||
|
||||
/**
|
||||
* 提交体检加项单签名入参
|
||||
*/
|
||||
export interface InputAddItemBillSignSubmit {
|
||||
/** 体检ID */
|
||||
exam_id: number;
|
||||
/** 签名图片文件 */
|
||||
sign_file: File | Blob;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交体检加项单签名出参
|
||||
*/
|
||||
export interface OutputAddItemBillSignInfo {
|
||||
/** 加项单文件名称 */
|
||||
pdf_name?: string | null;
|
||||
/** PDF文件地址 */
|
||||
pdf_url?: string | null;
|
||||
/** 消息内容 */
|
||||
message?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交体检加项单签名响应
|
||||
*/
|
||||
export type AddItemBillSignSubmitResponse = CommonActionResult<OutputAddItemBillSignInfo>;
|
||||
|
||||
/**
|
||||
* 体检导检单打印状态修改入参
|
||||
*/
|
||||
@@ -457,6 +484,8 @@ export interface InputPhysicalExamAddItem {
|
||||
* 加项界面客户基本信息
|
||||
*/
|
||||
export interface PoAddItemCustomerInfo {
|
||||
/** 患者ID */
|
||||
patient_id: number;
|
||||
/** 客户姓名 */
|
||||
customer_name?: string | null;
|
||||
/** 体检编号 */
|
||||
@@ -595,16 +624,10 @@ export interface InputPhysicalExamAddOrder {
|
||||
userName: string;
|
||||
/** 用户手机号 */
|
||||
userPhone: string;
|
||||
/** 体检加项产品ID列表(逗号分隔) */
|
||||
addItemIds: string;
|
||||
/** 微信Native产品ID */
|
||||
nativeProductId: string;
|
||||
/** 订单金额(元) */
|
||||
/** 体检组合项目代码(addItemList.combination_item_code 多个加项逗号分隔) */
|
||||
combinationItemCodes: string;
|
||||
/** 订单总金额(元) */
|
||||
orderAmount: number;
|
||||
/** 订单来源(mini_program-小程序,app-app应用等) */
|
||||
source: string;
|
||||
/** 商户ID(可选,不传则使用默认商户) */
|
||||
merchantId?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -618,8 +641,16 @@ export type PhysicalExamQrcodeCreateResponse = CommonActionResult<string>;
|
||||
export interface InputOrderPaymentInfo {
|
||||
/** 体检ID */
|
||||
physical_exam_id: number;
|
||||
/** 订单编号 */
|
||||
order_id: string;
|
||||
/** 患者ID */
|
||||
patient_id: number;
|
||||
/** 体检组合项目代码(addItemList.combination_item_code 多个加项逗号分隔) */
|
||||
combinationItemCodes: string;
|
||||
/** 折扣比例 */
|
||||
discount_rate: number;
|
||||
/** 支付方式(12-微信 13-挂账公司) */
|
||||
pay_type: number;
|
||||
/** 挂账公司ID(挂账公司传对应的ID,其他传0) */
|
||||
company_id: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user