fix(charge): 修正收费小票打印功能中的参数引用错误 BUG#217
- 将打印日志中的 chargeItem 参数更正为 chargedItems - 修复数据处理逻辑中使用错误的参数名 chargeItem - 添加注册号 regNo 字段到打印数据对象 - 修正机构名称拼接时可能出现的空值问题 - 将患者姓名字段从 name 更正为 patientName 以保持一致性
This commit is contained in:
@@ -253,7 +253,7 @@ const getUnitLabel = (unitCode) => {
|
||||
|
||||
async function printReceipt(param) {
|
||||
// 打印收费小票数据
|
||||
console.log('打印收费小票数据:', param.chargeItem);
|
||||
console.log('打印收费小票数据:', param.chargedItems);
|
||||
// console.log('!!!!!!!!!选中的收费项目:', param.chargedItems);
|
||||
console.log('患者信息:', props.patientInfo);
|
||||
// formData.totalAmount = props.totalAmount;
|
||||
@@ -271,7 +271,7 @@ async function printReceipt(param) {
|
||||
|
||||
try {
|
||||
// 处理param.chargedItems,添加quantityWithUnit字段
|
||||
const processedChargeItems = (param.chargeItem || []).map((item) => {
|
||||
const processedChargeItems = (param.chargedItems || []).map((item) => {
|
||||
// 获取单位标签
|
||||
const unitLabel = getUnitLabel(item.quantityUnit);
|
||||
// 拼接数量和单位
|
||||
@@ -532,18 +532,19 @@ async function printReceipt(param) {
|
||||
})(),
|
||||
|
||||
Mr_QR_Code: param.regNo,
|
||||
regNo: param.regNo || '',
|
||||
sex: props.patientInfo?.genderEnum_enumText || '',
|
||||
age: props.patientInfo?.age || '',
|
||||
|
||||
personType: param.contractName,
|
||||
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
fixmedinsName: (param.fixmedinsName || '') + '门诊收费明细',
|
||||
|
||||
//电子收据二维码
|
||||
pictureUrl: param.pictureUrl || 'https://chinaebill.com/img/xiaochengxu.png',
|
||||
|
||||
// 添加本地患者信息,注意安全访问
|
||||
name: props.patientInfo?.patientName || '',
|
||||
patientName: props.patientInfo?.patientName || '',
|
||||
gender: props.patientInfo?.genderEnum_enumText || '',
|
||||
encounterBusNo: props.patientInfo?.encounterBusNo || '',
|
||||
currentDate: currentDate.value,
|
||||
|
||||
Reference in New Issue
Block a user