添加orderAmount
This commit is contained in:
@@ -743,6 +743,8 @@ export interface InputOrderPaymentInfo {
|
|||||||
pay_type: number;
|
pay_type: number;
|
||||||
/** 挂账公司ID(挂账公司传对应的ID,其他传0) */
|
/** 挂账公司ID(挂账公司传对应的ID,其他传0) */
|
||||||
company_id: number;
|
company_id: number;
|
||||||
|
/** 订单总金额 */
|
||||||
|
orderAmount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -801,7 +801,8 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
}>,
|
}>,
|
||||||
pay_type: number,
|
pay_type: number,
|
||||||
company_id: number,
|
company_id: number,
|
||||||
combinationItemCodes: string
|
combinationItemCodes: string,
|
||||||
|
orderAmount: number
|
||||||
) => {
|
) => {
|
||||||
if (pollingTimerRef.current) {
|
if (pollingTimerRef.current) {
|
||||||
clearInterval(pollingTimerRef.current);
|
clearInterval(pollingTimerRef.current);
|
||||||
@@ -815,6 +816,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
listAddItemCombination,
|
listAddItemCombination,
|
||||||
pay_type,
|
pay_type,
|
||||||
company_id,
|
company_id,
|
||||||
|
orderAmount,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.Status === 200) {
|
if (res.Status === 200) {
|
||||||
@@ -928,6 +930,20 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
const patient_id = customerInfo.patient_id;
|
const patient_id = customerInfo.patient_id;
|
||||||
|
|
||||||
if (paymentMethod === 'self') {
|
if (paymentMethod === 'self') {
|
||||||
|
// 自费模式:如果是 0 元支付,直接查询状态,不生成二维码
|
||||||
|
if (totalCurrent === 0) {
|
||||||
|
startPaymentPolling(
|
||||||
|
physical_exam_id,
|
||||||
|
patient_id,
|
||||||
|
listAddItemCombination,
|
||||||
|
12, // 微信支付
|
||||||
|
0, // 自费模式,company_id 传 0
|
||||||
|
combinationItemCodes,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 自费模式:生成二维码
|
// 自费模式:生成二维码
|
||||||
const res = await createNativePaymentQrcode({
|
const res = await createNativePaymentQrcode({
|
||||||
physical_exam_id,
|
physical_exam_id,
|
||||||
@@ -952,7 +968,8 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
listAddItemCombination,
|
listAddItemCombination,
|
||||||
12, // 微信支付
|
12, // 微信支付
|
||||||
0, // 自费模式,company_id 传 0
|
0, // 自费模式,company_id 传 0
|
||||||
combinationItemCodes
|
combinationItemCodes,
|
||||||
|
totalCurrent
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setPaymentMessage(res.Message || '生成支付二维码失败');
|
setPaymentMessage(res.Message || '生成支付二维码失败');
|
||||||
@@ -984,6 +1001,7 @@ export const ExamAddonPanel = ({ client, onGoToSign }: ExamAddonPanelProps) => {
|
|||||||
listAddItemCombination,
|
listAddItemCombination,
|
||||||
pay_type: 13, // 挂账公司
|
pay_type: 13, // 挂账公司
|
||||||
company_id: selectedCompany.company_id,
|
company_id: selectedCompany.company_id,
|
||||||
|
orderAmount: totalCurrent,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.Status === 200) {
|
if (res.Status === 200) {
|
||||||
|
|||||||
Reference in New Issue
Block a user