fix(charge): 修复医保支付计算中的潜在空指针异常
- 在 chargeDialog.vue 中为所有 param.detail.find() 调用添加可选链操作符
- 修复了基金支付总额、个人负担总金额和其他支付类型的空指针风险
- 解决了基本医保统筹基金支出等各项支付类型的潜在运行时错误
- 在微信刷卡支付逻辑中同样应用可选链操作符保护
- 修复了 FULAMT_OWNPAY_AMT 计算中的运算符优先级问题
feat(hospitalRecord): 动态替换打印模板中的医院名称
- 在 MedicationDetails.vue 中引入并使用 userStore 获取医院名称
- 修改处置模板打印逻辑以动态替换 {{HOSPITAL_NAME}} 占位符
- 更新处方模板打印功能以支持医院名称的动态替换
- 激活之前被注释掉的模板文件导入语句
- 移除硬编码的医院名称,实现模板的动态化配置
This commit is contained in:
@@ -1046,7 +1046,9 @@ function handlePrint() {
|
||||
purchaseinventoryList: form.purchaseinventoryList,
|
||||
});
|
||||
console.log(result, '345678987654');
|
||||
const printElements = templateJson;
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
|
||||
);
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'EPSON LQ-80KFII',
|
||||
|
||||
@@ -244,7 +244,9 @@ function handlePrint() {
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
purchaseinventoryList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
|
||||
);
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'EPSON LQ-80KFII',
|
||||
|
||||
@@ -1436,8 +1436,11 @@ function handlePrintPreview() {
|
||||
console.log("打印数据:", printData);
|
||||
|
||||
// 创建打印模板实例
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
|
||||
);
|
||||
const hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: templateJson,
|
||||
template: printElements,
|
||||
});
|
||||
|
||||
// 打开预览窗口(推荐)
|
||||
@@ -1515,8 +1518,11 @@ function handleDirectPrint() {
|
||||
console.log("打印数据:", printData);
|
||||
|
||||
// 创建打印模板实例
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
|
||||
);
|
||||
const hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: templateJson,
|
||||
template: printElements,
|
||||
});
|
||||
|
||||
// 直接打印到指定打印机
|
||||
@@ -1591,8 +1597,11 @@ function handlePrintWithSelectPrinter() {
|
||||
console.log("打印数据:", printData);
|
||||
|
||||
// 创建打印模板实例
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
|
||||
);
|
||||
const hiprintTemplate = new hiprint.PrintTemplate({
|
||||
template: templateJson,
|
||||
template: printElements,
|
||||
});
|
||||
|
||||
// 获取打印机列表并选择
|
||||
|
||||
@@ -243,7 +243,9 @@ function handlePrint() {
|
||||
busNo: printList[0].busNo,
|
||||
detailsList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
const printElements = JSON.parse(
|
||||
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
|
||||
);
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
title: '打印标题',
|
||||
|
||||
Reference in New Issue
Block a user