217 收费工作站-》门诊收费:【确认收费】报错“打印失败”

220 门诊医生站:新增耗材收费项目医嘱单价/总金额未显示正确的值
This commit is contained in:
Ranyunqiao
2026-03-26 16:55:06 +08:00
parent 8739959be0
commit 188b907907
12 changed files with 304 additions and 66 deletions

View File

@@ -14,10 +14,11 @@ export function getList(queryParams) {
/**
* 患者处方列表
*/
export function getChargeList(encounterId) {
export function getChargeList(encounterId, config = {}) {
return request({
url: '/charge-manage/charge/patient-prescription?encounterId=' + encounterId,
method: 'get',
...config
})
}
@@ -111,11 +112,12 @@ export function unprecharge(data) {
/**
* 发耗材
*/
export function dispenseMedicalConsumables(data) {
export function dispenseMedicalConsumables(data, config = {}) {
return request({
url: '/pharmacy-manage/device-dispense/consumables-dispense',
method: 'put',
data: data
data: data,
...config
})
}
@@ -123,11 +125,12 @@ export function dispenseMedicalConsumables(data) {
/**
* 补打小票
*/
export function getChargeInfo(param) {
export function getChargeInfo(param, config = {}) {
return request({
url: '/payment/bill/getDetail',
method: 'get',
params: param
params: param,
...config
})
}

View File

@@ -476,9 +476,12 @@ async function printReceipt(param) {
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(现金)
SELF_CASH_VX_VALUE: (() => {
const amount = param.detail?.find((t) => t.payEnum === 220100)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
})(), // 个人现金支付金额(微信)
// 微信+银联+支付宝的合计金额
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) + ' 元';
})(),
SELF_CASH_ALI_VALUE: (() => {
const amount = param.detail?.find((t) => t.payEnum === 220200)?.amount ?? 0;
return amount > 0 ? amount + ' 元' : amount;
@@ -537,14 +540,6 @@ async function printReceipt(param) {
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 (Number(vxValue) + Number(unionValue) + Number(aliValue)).toFixed(2) + ' 元';
})(),
Mr_QR_Code: param.regNo,
regNo: param.regNo || '',
@@ -659,16 +654,24 @@ async function submit() {
})
.then((res) => {
if (res.code == 200) {
getChargeInfo({ paymentId: props.paymentId }).then((res) => {
// 传递完整的选中数据信息到打印方法
printReceipt({ ...res.data, chargedItems: props.chargedItems });
});
getChargeInfo({ paymentId: props.paymentId }, { skipErrorMsg: true })
.then((res) => {
// 传递完整的选中数据信息到打印方法
printReceipt({ ...res.data, chargedItems: props.chargedItems });
})
.catch(() => {
// 打印失败不影响收费成功流程
});
formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }];
emit('close', 'success', res.msg);
emit('refresh'); // 发送刷新事件给父组件
// 长春市朝阳区中医院自动发耗材
// 长春市朝阳区中医院自动发耗材(静默执行,不阻塞主流程)
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
dispenseMedicalConsumables(props.consumablesIdList);
dispenseMedicalConsumables(props.consumablesIdList, { skipErrorMsg: true })
.then(() => {})
.catch(() => {
// 发耗材失败不影响收费成功流程
});
}
} else {
proxy.$modal.msgError(res.msg || '收费失败');

View File

@@ -325,7 +325,7 @@ function handleClose(value, msg) {
if (value == 'success') {
proxy.$modal.msgSuccess(msg);
chargeLoading.value = true;
getChargeList(patientInfo.value.encounterId).then((res) => {
getChargeList(patientInfo.value.encounterId, { skipErrorMsg: true }).then((res) => {
chargeList.value = res.data;
setTimeout(() => {
chargeLoading.value = false;