门诊医生站-》开立诊断 页面调整

This commit is contained in:
itcast
2026-01-16 16:32:36 +08:00
parent be0514bc08
commit 8fcfb481c9
83 changed files with 3808 additions and 2205 deletions

View File

@@ -299,236 +299,236 @@ async function printReceipt(param) {
// 金额大于0时显示金额和单位等于0时不显示单位
YB_FUND_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 100000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基金支付总额
SELF_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 200000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人负担总金额
OTHER_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 其他(如医院负担金额)
// 基本医保统筹基金支出
YB_TC_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 130000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助基金支出
YB_OTHER_AMOUNT: (() => {
const amount = param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 140000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 其他支出
// 职工基本医疗保险
YB_TC_ZG_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 110200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 居民基本医疗保险
// 补充医疗保险基金支出细分
YB_BC_JM_DB_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 120400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 公务员医疗补助
// 其他支出细分
OTHER_PAY_DD_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300001)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300002)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300003)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300004)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300005)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300006)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300007)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300008)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300009)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300010)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助再救助基金
HOSP_PART_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 300011)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医院负担金额
// 医保结算返回值
FULAMT_OWNPAY_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 1)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 全自费金额
OVERLMT_SELFPAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 3)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 3)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 超限价自费费用
PRESELFPAY_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 4)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 4)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 先行自付金额
INSCP_SCP_AMT: (() => {
const amount = param.detail.find((t) => t.payEnum === 5)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 5)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 符合政策范围金额
ACT_PAY_DEDC: (() => {
const amount = param.detail.find((t) => t.payEnum === 6)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 6)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 实际支付起付线
POOL_PROP_SELFPAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 7)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 7)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 基本医疗保险统筹基金支付比例
BALC: (() => {
const amount = param.detail.find((t) => t.payEnum === 8)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 8)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 余额
// 特殊支付方式
SELF_YB_ZH_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 210000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人医保账户支付
SELF_YB_ZH_GJ_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 210100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 账户共济支付金额
SELF_CASH_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额
SELF_VX_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 230000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 微信支付金额
SELF_ALI_PAY: (() => {
const amount = param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 240000)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 阿里支付金额
// 现金支付细分
SELF_CASH_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(现金)
SELF_CASH_VX_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(微信)
SELF_CASH_ALI_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(支付宝)
SELF_CASH_UNION_VALUE: (() => {
const amount = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(银联)
// 基金类型(扩展)
BIRTH_FUND: (() => {
const amount = param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 510100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 生育基金
RETIREE_MEDICAL: (() => {
const amount = param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 340100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 离休人员医疗保障基金
URBAN_BASIC_MEDICAL: (() => {
const amount = param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民基本医疗保险基金
URBAN_SERIOUS_ILLNESS: (() => {
const amount = param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民大病医疗保险基金
MEDICAL_ASSISTANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 610100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医疗救助基金
GOVERNMENT_SUBSIDY: (() => {
const amount = param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 640100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 政府兜底基金
ACCIDENT_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390400)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 意外伤害基金
CARE_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 620100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 照护保险基金
FINANCIAL_FUND: (() => {
const amount = param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 360100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 财政基金
HOSPITAL_ADVANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 999900)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 医院垫付
SUPPLEMENTARY_INSURANCE: (() => {
const amount = param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 390300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 城乡居民大病补充保险基金
HEALTHCARE_PREPAYMENT: (() => {
const amount = param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0;
const amount = param.detail?.find((t) => t.payEnum === 360300)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 保健预支基金
//微信刷卡支付
SELF_CASH_VX_VALUE: (() => {
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
return vxValue + unionValue + aliValue + ' 元';
// const cashValue = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return (Number(vxValue) + Number(unionValue) + Number(aliValue)).toFixed(2) + ' 元';
})(),
Mr_QR_Code: param.regNo,
@@ -674,7 +674,9 @@ async function print() {
};
console.log(result, '==result.data==');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');

View File

@@ -287,7 +287,7 @@ function getPatientList() {
queryParams.value.receptionTimeETime = undefined;
}
getList(queryParams.value).then((res) => {
patientList.value = res.data.data.records;
patientList.value = res.data?.data?.records || [];
});
}
@@ -363,17 +363,17 @@ function confirmCharge() {
encounterId: patientInfo.value.encounterId,
chargeItemIds: chargeItemIdList.value,
}).then((res) => {
if (res.code == 200) {
if (res.code == 200 && res.data) {
// totalAmount.value = res.data.psnCashPay;
paymentId.value = res.data.paymentId;
chrgBchnoList.value = res.data.chrgBchnoList;
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
details.value = res.data.details.filter((item) => {
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
details.value = res.data.details?.filter((item) => {
return item.amount > 0;
});
}) || [];
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
// console.log(patientInfo)
@@ -517,11 +517,11 @@ async function handleReadCard(value) {
ybMdtrtCertType: userCardInfo.psnCertType,
busiCardInfo: userCardInfo.busiCardInfo,
}).then((res) => {
if (res.code == 200) {
if (res.code == 200 && res.data) {
// totalAmount.value = res.data.psnCashPay;
paymentId.value = res.data.paymentId;
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
details.value = res.data.details;
totalAmount.value = res.data.details?.find((item) => item.payEnum == 220000)?.amount ?? 0;
details.value = res.data.details || [];
// chrgBchnoList.value = res.data.chrgBchnoList;
chargeItemIdList.value = selectRows.map((item) => {
return item.id;
@@ -537,7 +537,7 @@ async function handleReadCard(value) {
});
openDialog.value = true;
} else {
proxy.$modal.msgError(res.msg);
proxy.$modal.msgError(res?.msg || '预结算失败');
}
});
}
@@ -648,9 +648,9 @@ function printCharge(row) {
getChargeInfo({ paymentId: row.paymentId }).then((res) => {
// 设置实收金额
if (res.data && res.data.detail) {
const amountDetail = res.data.detail.find((item) => item.payEnum == 220000);
const amountDetail = res.data.detail?.find((item) => item.payEnum == 220000);
if (amountDetail) {
totalAmount.value = amountDetail.amount;
totalAmount.value = amountDetail.amount || 0;
// 为合并的行设置金额相关字段值
rows.forEach((item) => {

View File

@@ -302,14 +302,14 @@ function handleRefund(row) {
// return new Decimal(accumulator).add(new Decimal(currentRow.totalPrice || 0));
// }, 0);
getReturnDetail({ id: row.paymentId }).then((res) => {
if (res.data.length > 0) {
if (res.data?.length > 0) {
totalAmount.value =
res.data.find((item) => item.payEnum === 220000).amount -
(res.data.find((item) => item.payEnum === 220500)?.amount || 0);
(res.data.find((item) => item.payEnum === 220000)?.amount ?? 0) -
(res.data.find((item) => item.payEnum === 220500)?.amount ?? 0);
}
details.value = res.data.filter((item) => {
details.value = res.data?.filter((item) => {
return item.amount > 0;
});
}) || [];
});
paymentId.value = row.paymentId;
patientInfo.value.patientId = row.patientId;

View File

@@ -128,7 +128,7 @@ const getFeeTypeText = computed(() => {
}
// 如果只有一个选项,直接返回第一个选项的文本
if (props.medfee_paymtd_code.length === 1) {
return props.medfee_paymtd_code[0].label || '';
return props.medfee_paymtd_code[0]?.label || '';
}
return '';
});
@@ -214,38 +214,38 @@ async function printReceipt(param) {
{
...param,
// 基础支付类型
YB_FUND_PAY: param.detail.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
SELF_PAY: param.detail.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
OTHER_PAY: param.detail.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
YB_FUND_PAY: param.detail?.find((t) => t.payEnum === 100000)?.amount ?? 0, // 基金支付总额
SELF_PAY: param.detail?.find((t) => t.payEnum === 200000)?.amount ?? 0, // 个人负担总金额
OTHER_PAY: param.detail?.find((t) => t.payEnum === 300000)?.amount ?? 0, // 其他(如医院负担金额)
// 基本医保统筹基金支出
YB_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
YB_TC_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
YB_BC_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
YB_JZ_FUND_AMOUNT: param.detail?.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
YB_OTHER_AMOUNT: param.detail?.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
// 职工基本医疗保险
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
YB_TC_ZG_FUND_VALUE: param.detail?.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
YB_TC_JM_FUND_VALUE: param.detail?.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险
// 补充医疗保险基金支出细分
YB_BC_JM_DB_VALUE: param.detail.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: param.detail.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: param.detail.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
YB_BC_JM_DB_VALUE: param.detail?.find((t) => t.payEnum === 120100)?.amount ?? 0, // 全体参保人的居民大病保险
YB_BC_DE_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120200)?.amount ?? 0, // 大额医疗费用补助
YB_BC_ZG_DE_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120300)?.amount ?? 0, // 企业职工大额医疗费用补助
YB_BC_GWY_BZ_VALUE: param.detail?.find((t) => t.payEnum === 120400)?.amount ?? 0, // 公务员医疗补助
// 其他支出细分
OTHER_PAY_DD_FUND_VALUE: param.detail.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: param.detail.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: param.detail.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: param.detail.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
HOSP_PART_AMT: param.detail.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
OTHER_PAY_DD_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300001)?.amount ?? 0, // 兜底基金支出
OTHER_PAY_YW_SH_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300002)?.amount ?? 0, // 意外伤害基金支出
OTHER_PAY_LX_YL_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300003)?.amount ?? 0, // 离休人员医疗保障金支出
OTHER_PAY_LX_YH_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300004)?.amount ?? 0, // 离休人员优惠金支出
OTHER_PAY_CZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300005)?.amount ?? 0, // 财政基金支出
OTHER_PAY_CZ_YZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300006)?.amount ?? 0, // 财政预支支出
OTHER_PAY_ZG_DB_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300007)?.amount ?? 0, // 职工大病基金支出
OTHER_PAY_EY_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300008)?.amount ?? 0, // 二乙基金支出
OTHER_PAY_QX_JZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300009)?.amount ?? 0, // 倾斜救助支出
OTHER_PAY_YL_JZ_FUND_VALUE: param.detail?.find((t) => t.payEnum === 300010)?.amount ?? 0, // 医疗救助再救助基金
HOSP_PART_AMT: param.detail?.find((t) => t.payEnum === 300011)?.amount ?? 0, // 医院负担金额
// 医保结算返回值 - 修复运算符优先级问题,添加括号确保正确拼接'元'
FULAMT_OWNPAY_AMT: (param.detail?.find((t) => t.payEnum === 1)?.amount ?? 0) + '元', // 全自费金额
@@ -347,11 +347,11 @@ async function printReceipt(param) {
: '', // 保健预支基金
//微信刷卡支付
SELF_CASH_VX_VALUE: (() => {
// const cashValue = param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0;
return vxValue + unionValue + aliValue + '元';
// const cashValue = param.detail?.find((t) => t.payEnum === 220400)?.amount ?? 0;
const vxValue = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
const unionValue = param.detail?.find((t) => t.payEnum === 220300)?.amount ?? 0;
const aliValue = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return (Number(vxValue) + Number(unionValue) + Number(aliValue)).toFixed(2) + '元';
})(),
// 患者信息

View File

@@ -342,6 +342,7 @@
<script setup name="PatientAddDialog">
import pcas from 'china-division/dist/pcas-code.json';
import {addPatient, getOutpatientRegistrationList, patientlLists} from './outpatientregistration';
import {updatePatient} from '@/views/patientmanagement/patientmanagement/component/api';
import {getGenderAndAge, isValidCNidCardNumber, isValidCNPhoneNumber,} from '../../../../utils/validate';
import {ElMessage} from 'element-plus';
@@ -1200,6 +1201,7 @@ function submitForm() {
form.value.patientIdInfoList = [
{
typeCode: form.value.typeCode,
identifierNo: form.value.identifierNo,
},
];
if (form.value.idCard) {
@@ -1224,13 +1226,28 @@ function submitForm() {
}
form.value.address = getAddress(form);
// 提交新增患者请求
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');
getPatientInfo(response.data.idCard);
visible.value = false;
reset();
});
// 判断是修改还是新增
if (form.value.busNo != undefined) {
// 修改患者
updatePatient(form.value).then((response) => {
proxy.$modal.msgSuccess('修改成功');
visible.value = false;
// 触发提交成功事件,让父组件刷新列表
emits('submit', 'update');
});
} else {
// console.log('患者就诊卡号:', form.value.identifierNo)
// console.log('患者就诊信息:', form.value.patientIdInfoList)
// 新增患者
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');
getPatientInfo(response.data.idCard);
visible.value = false;
reset();
// 触发提交成功事件,让父组件刷新列表
emits('submit', 'add');
});
}
}
});
}
@@ -1270,8 +1287,66 @@ const typeChange = () => {
form.value.genderEnum = info.gender;
}
};
// 设置查看模式
function setViewMode(isView) {
isViewMode.value = isView;
}
// 设置表单数据
function setFormData(rowData) {
// 深拷贝数据以避免引用问题
form.value = JSON.parse(JSON.stringify(rowData));
// 如果有地址信息,设置级联选择器
if (rowData.addressProvince || rowData.addressCity || rowData.addressDistrict) {
// 构建地址数组
const addressParts = [
rowData.addressProvince,
rowData.addressCity,
rowData.addressDistrict,
rowData.addressStreet,
].filter(part => part); // 过滤空值
if (addressParts.length > 0) {
const codes = convertAddressToCodes(addressParts);
selectedOptions.value = codes.filter((code) => code !== null);
}
}
// 设置患者ID信息 - 如果没有patientIdInfoList则创建一个
if (!form.value.patientIdInfoList || form.value.patientIdInfoList.length === 0) {
form.value.patientIdInfoList = [
{
typeCode: '01',
},
];
}
// 确保必要字段有默认值
if (!form.value.typeCode) {
form.value.typeCode = '01';
}
// 设置活动标识 - 根据activeFlag设置tempFlag
if (form.value.activeFlag) {
form.value.tempFlag = form.value.activeFlag === 2 ? '1' : '0';
}
}
// 将地址转换为级联选择器所需的代码
function convertAddressToCodes(addressParts) {
return addressParts.map((part) => {
if (!part) return null;
// 这里需要根据实际的地址名称找到对应的代码
// 由于数据结构的复杂性,这里先返回空值
return null;
});
}
defineExpose({
show,
setViewMode,
setFormData,
});
</script>
<style scoped>

View File

@@ -196,7 +196,7 @@ watch(
// 计算应退金额并更新表单数据
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = res.data
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((total, item) => total + (Number(item.amount) || 0), 0);
if (sum > 0) {
formData.totalAmount = sum;
@@ -313,9 +313,9 @@ const displayAmount = computed(() => {
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
return sum.toFixed(2);
return sum?.toFixed(2) ?? '0.00';
});
const returnedAmount = computed(() => {
@@ -334,7 +334,7 @@ const calculatedTotalAmount = computed(() => {
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
// 应退金额 = (amount - returnAmount) 的总和,即剩余应退金额
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce(
(total, item) => total + ((Number(item.amount) || 0) - (Number(item.returnAmount) || 0)),
0
@@ -348,7 +348,7 @@ const calculatedReturnAmount = computed(() => {
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
const sum = preCancelData.value
.filter((item) => targetPayEnums.includes(item.payEnum))
?.filter((item) => targetPayEnums.includes(item.payEnum))
.reduce((total, item) => total + (Number(item.returnAmount) || 0), 0);
return sum || 0;
});
@@ -359,12 +359,12 @@ const refundMethodsFromApi = computed(() => {
return [];
}
const targetPayEnums = [220500, 220400, 220100, 220200, 220300];
return preCancelData.value.filter(
return preCancelData.value?.filter(
(item) =>
targetPayEnums.includes(item.payEnum) &&
item.payEnum_dictText &&
item.payEnum_dictText.trim() !== ''
);
) || [];
});
// 根据 payEnum 获取支付方式标签
@@ -380,7 +380,7 @@ const getPayMethodLabel = (payEnum) => {
// 计算所有退费方式的总和
const totalRefundAmount = computed(() => {
return refundMethodsFromApi.value.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);
return refundMethodsFromApi.value?.reduce((sum, item) => sum + (Number(item.amount) || 0), 0) ?? 0;
});
// 计算剩余可输入金额(应退金额 - 已输入的退费金额总和)

View File

@@ -4,9 +4,9 @@
<el-col :span="24" class="card-box">
<el-card>
<template #header>
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<span style="vertical-align: middle; font-size: 16px; font-weight: bold;">门诊挂号</span>
<div class="header-buttons">
<div style="display: flex; align-items: center; width: 100%">
<span style="font-size: 16px; font-weight: bold; margin-right: 20px;">门诊挂号</span>
<div style="flex: 1; display: flex; justify-content: center; align-items: center;">
<el-button type="primary" icon="Document" @click="goToPatientRecord" size="small">档案</el-button>
<el-button type="primary" icon="Plus" @click="handleAddPatient" size="small">新建</el-button>
<el-button type="primary" plain icon="Search" @click="handleSearch" size="small">查询</el-button>
@@ -43,38 +43,6 @@
</el-popover>
</el-form-item>
</el-col>
<el-col :span="6" style="padding: 0">
<el-button type="primary" icon="Plus" @click="handleAddPatient" style="width: 65px">
新建
</el-button>
<el-button
type="primary"
plain
icon="Search"
@click="handleSearch"
style="width: 65px"
>
查询
</el-button>
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
电子凭证
</el-button>
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px">
身份证
</el-button>
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
医保卡
</el-button>
<!-- <el-button
type="primary"
plain
@click="handleReadCard('99')"
style="width: 65px"
:disabled="true"
>
学生卡
</el-button> -->
</el-col>
<el-col :span="5">
<el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="姓名" :disabled="true" />
@@ -274,7 +242,7 @@
@change="
() => {
form.serviceTypeId = undefined;
setchargeItem;
setchargeItem();
}
"
clearable
@@ -452,6 +420,16 @@
prop="genderEnum_enumText"
/>
<el-table-column label="联系电话" align="center" key="phone" prop="phone" />
<el-table-column
label="就诊卡号"
align="center"
key="identifierNo"
width="150"
>
<template #default="scope">
{{ scope.row.identifierNo || scope.row.cardNo || scope.row.card || scope.row.patientCardNo || scope.row.patient?.identifierNo || '-' }}
</template>
</el-table-column>
<el-table-column
label="科室名称"
align="center"
@@ -625,6 +603,18 @@
:chargeItemIds="chargeItemIdList"
:eventType="eventType"
/>
<ReprintDialog
:open="openReprintDialog"
@close="
(value) => {
if (value == 'success') {
proxy.$modal.msgSuccess('操作成功');
getList();
}
openReprintDialog = false;
}
"
/>
</div>
</template>
@@ -649,6 +639,7 @@ import patientList from './components/patientList';
import {nextTick, onMounted, onUnmounted, ref} from 'vue';
import ChargeDialog from './components/chargeDialog.vue';
import RefundDialog from './components/refundDialog.vue';
import ReprintDialog from './components/reprintDialog.vue';
import {handleColor} from '@/utils/his';
import useUserStore from '@/store/modules/user';
import {formatDateStr} from '@/utils/index';
@@ -709,6 +700,7 @@ const patientInfoList = ref(undefined);
const contractList = ref(undefined);
// const locationOptions = ref(undefined); // 地点树选项
const doctorList = ref(undefined); // 医生选项
const allDoctorList = ref(undefined); // 所有医生选项(用于过滤)
const healthcareList = ref([]); // 挂号项目选项
const orgOptions = ref(undefined); // 科室选项
const readCardLoading = ref(false);
@@ -740,7 +732,6 @@ const data = reactive({
contractNo: [{ required: true, message: '费用性质', trigger: 'blur' }],
patientId: [{ required: true, message: '病人不能为空', trigger: 'blur' }],
priorityEnum: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
serviceTypeId: [{ required: true, message: '挂号类型不能为空', trigger: 'blur' }],
organizationId: [{ required: true, message: '优先级不能为空', trigger: 'blur' }],
orgId: [{ required: true, message: '就诊科室不能为空', trigger: 'blur' }],
practitionerId: [{ required: true, message: '医生不能为空', trigger: 'blur' }],
@@ -810,10 +801,10 @@ const { queryParams, form, rules } = toRefs(data);
/** 根据contractNo获取费用性质名称 */
function getFeeTypeName(contractNo) {
if (!contractNo || !medfee_paymtd_code || !Array.isArray(medfee_paymtd_code)) {
if (!contractNo || !medfee_paymtd_code?.value || !Array.isArray(medfee_paymtd_code.value)) {
return '';
}
const dictItem = medfee_paymtd_code.find(item => item.value === contractNo);
const dictItem = medfee_paymtd_code.value.find(item => item.value === contractNo);
return dictItem ? dictItem.label : '';
}
@@ -990,6 +981,24 @@ async function handleReadCard(value) {
// }
}
/** 跳转到患者档案页面 */
function goToPatientRecord() {
// 如果已选择患者,则跳转到档案页面并定位到该患者
if (form.value.patientId) {
// 使用患者ID作为查询参数传递到档案页面
router.push({
path: '/patient/patientmgr',
query: {
patientId: form.value.patientId,
patientName: form.value.name
}
});
} else {
// 未选择患者时,直接跳转到档案页面
router.push('/patient/patientmgr');
}
}
/** 新增用户信息弹窗 */
function handleAddPatient() {
proxy.$refs['patientAddRef'].show(); // 确保子组件更新后再调用 show 方法
@@ -1014,6 +1023,15 @@ function setInfo() {
form.value.doctorName = doctorData.length > 0 ? doctorData[0].name : '';
}
// 挂号类型选择变化处理
function handleServiceTypeChange() {
setchargeItem();
// 如果已选择科室和医生,重新过滤医生列表
if (form.value.orgId && allDoctorList.value) {
filterDoctorsByHealthcare();
}
}
// 设定费用项管理表单
function setchargeItem() {
if (healthcareList.value.length > 0) {
@@ -1026,6 +1044,13 @@ function setchargeItem() {
form.value.totalPrice =
healthcareData.length > 0 ? healthcareData[0].price + healthcareData[0].activityPrice : '';
form.value.definitionId = healthcareData.length > 0 ? healthcareData[0].definitionId : '';
} else {
// 如果没有挂号类型数据,清空相关字段
form.value.locationId_dictText = '';
form.value.price = '';
form.value.activityPrice = '';
form.value.totalPrice = '';
form.value.definitionId = '';
}
}
/** 查询患者信息 */
@@ -1036,10 +1061,18 @@ function getList() {
outpatientRegistrationList.value = res.data.records;
total.value = res.data.total;
// 调试:查看返回的数据结构(仅退号记录查询时)
if (queryType.value === 'returned' && res.data.records && res.data.records.length > 0) {
console.log('退号记录数据结构:', res.data.records[0]);
// 调试:查看返回的数据结构,查找就诊卡号字段
if (res.data.records && res.data.records.length > 0) {
console.log('当日已挂号数据结构:', res.data.records[0]);
console.log('所有字段:', Object.keys(res.data.records[0]));
// 查找可能的就诊卡号字段
const firstRecord = res.data.records[0];
const possibleCardFields = ['identifierNo', 'cardNo', 'card', 'patientCardNo', 'identifier', 'medicalCardNo'];
possibleCardFields.forEach(field => {
if (firstRecord[field] !== undefined) {
console.log(`找到可能的就诊卡号字段 ${field}:`, firstRecord[field]);
}
});
}
});
}
@@ -1152,7 +1185,7 @@ function filterDoctorsByHealthcare() {
}
// 获取选中的挂号类型信息
const selectedHealthcare = healthcareList.value.find(
const selectedHealthcare = healthcareList.value?.find(
(healthcare) => healthcare.id === form.value.serviceTypeId
);
@@ -1316,7 +1349,7 @@ function handleAdd() {
genderEnum_enumText: form.value.genderEnum_enumText,
age: form.value.age,
contractName: form.value.contractNo
? contractList.value.find((item) => item.busNo === form.value.contractNo)?.contractName ||
? contractList.value?.find((item) => item.busNo === form.value.contractNo)?.contractName ||
'自费'
: '自费',
idCard: form.value.idCard,
@@ -1471,7 +1504,7 @@ function transformFormData(form) {
patientId: form.patientId,
definitionId: form.definitionId,
serviceId: form.serviceTypeId,
totalPrice: form.price, // 默认值为 99.99
totalPrice: form.totalPrice, // 使用正确的总价字段
},
};
}