diff --git a/openhis-ui-vue3/src/views/charge/cliniccharge/index.vue b/openhis-ui-vue3/src/views/charge/cliniccharge/index.vue index 659a71b6..90a9bc55 100644 --- a/openhis-ui-vue3/src/views/charge/cliniccharge/index.vue +++ b/openhis-ui-vue3/src/views/charge/cliniccharge/index.vue @@ -99,7 +99,9 @@ > 学生自费转学生医保 - +
+ 合计金额:{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}元
diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 95fe0f99..0ffa6e51 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -2429,7 +2429,9 @@ function handleSave(prescriptionId) { totalPrice: item.totalPrice, // Ensure totalPrice is valid // 🔧 Bug Fix: 确保库存匹配成功的关键字段 adviceTableName: adviceTableNameVal, - locationId: locationIdVal + locationId: locationIdVal, + // 🔧 确保 methodCode 被传递(用于触发耗材绑定逻辑) + methodCode: item.methodCode || parsedContent.methodCode }; }); @@ -2446,7 +2448,7 @@ function handleSave(prescriptionId) { }) .then((res) => { if (res.code === 200) { - proxy.$modal.msgSuccess('签发成功'); // 提示文案改为签发成功更准确 + proxy.$modal.msgSuccess('签发成功'); isSaving.value = false; getListInfo(false); bindMethod.value = {}; @@ -2550,7 +2552,7 @@ function stockFormat(partPercent, unitList, quantity) { } // 处理自动带出的诊疗或者耗材 -function handleOrderBindInfo(bindIdInfo) { +function handleOrderBindInfo(bindIdInfo, currentMethodCode) { const adviceDefinitionIds = bindIdInfo.map((row) => row.orderDefinitionId); getAdviceBaseInfo({ adviceDefinitionIdParamList: adviceDefinitionIds.join(','), @@ -2562,6 +2564,8 @@ function handleOrderBindInfo(bindIdInfo) { ...item, quantity: info.quantity, unitCode: info.unitCode, + // 🔧 使用当前药品的用法编码,这样耗材才能继承用法绑定关系 + methodCode: currentMethodCode, }; }); @@ -2573,7 +2577,13 @@ function handleOrderBindInfo(bindIdInfo) { item.adviceType = 4; } + // 🔧 先添加一个空对象到数组,确保 setValue 可以访问 rowIndex.value = prescriptionList.value.length; + prescriptionList.value[rowIndex.value] = { + uniqueKey: nextId.value++, + adviceType: item.adviceType, + }; + setValue(item); // 创建新的处方项目 @@ -2584,7 +2594,7 @@ function handleOrderBindInfo(bindIdInfo) { encounterId: props.patientInfo.encounterId, accountId: accountId.value, quantity: item.quantity, - methodCode: item.methodCode, + methodCode: item.methodCode, // 🔧 现在 item.methodCode 有值了 rateCode: item.rateCode, dispensePerDuration: item.dispensePerDuration, dose: item.dose, @@ -2597,6 +2607,9 @@ function handleOrderBindInfo(bindIdInfo) { conditionId: conditionId.value, conditionDefinitionId: conditionDefinitionId.value, encounterDiagnosisId: encounterDiagnosisId.value, + // 🔧 确保 adviceType 和显示文本正确设置 + adviceType: item.adviceType, + adviceType_dictText: mapAdviceTypeLabel(item.adviceType), }; // 计算价格和总量 @@ -2717,7 +2730,7 @@ function handleSaveSign(row, index, prescriptionId) { // 如果弹窗不提示带出的项目,自动带出 // 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出 if (!bindMethod.value[itemNo]) { - handleOrderBindInfo(res.data); + handleOrderBindInfo(res.data, row.methodCode); bindMethod.value[itemNo] = true; } }