From c84fc3c23647f5d60fec3178522a21c67a94d689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E9=94=A6=E6=B6=9B?= <26050301730@qq.com> Date: Wed, 19 Nov 2025 16:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/tcm/tcmAdvice.vue | 84 ++----------------- 1 file changed, 7 insertions(+), 77 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue b/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue index a0af048b..fb725902 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue @@ -1655,89 +1655,19 @@ function validateGroups(saveList) { } return true; } -// 获取处方单药品数量 -function getPrescriptionMedicineCount(prescriptionIndex) { - // 这里需要根据实际数据结构来判断,暂时返回0 - // TODO: 根据处方单索引获取对应的药品数量 - return 0; -} -// 获取处方单总价 -function getPrescriptionTotalPrice(prescriptionIndex) { - // 这里需要根据实际数据结构来判断,暂时返回0 - // TODO: 根据处方单索引获取对应的总价 - return 0; -} -// 判断处方单是否可删除 -function isPrescriptionDeletable(prescriptionIndex) { - // 条件1:处方单没有药品 - const medicineCount = getPrescriptionMedicineCount(prescriptionIndex); - if (medicineCount > 0) { - return false; - } - - // 条件2:处方单未收费(这里需要根据实际收费状态字段判断) - // TODO: 根据实际的收费状态字段来判断 - // const isCharged = checkPrescriptionCharged(prescriptionIndex); - // if (isCharged) { - // return false; - // } - - return true; -} -// 删除处方单 -function handleDeletePrescriptionClick(prescriptionIndex) { - if (!isPrescriptionDeletable(prescriptionIndex)) { - const medicineCount = getPrescriptionMedicineCount(prescriptionIndex); - if (medicineCount > 0) { - proxy.$modal.msgWarning('该处方单还有药品,请先删除所有药品后再删除处方单'); - } else { - proxy.$modal.msgWarning('该处方单已收费,不能删除'); - } - return; - } - - // 确认删除 - proxy.$modal.confirm('确定要删除这个处方单吗?').then(() => { - tcmPrescriptionList.value.splice(prescriptionIndex, 1); - proxy.$modal.msgSuccess('处方单删除成功'); - }).catch(() => { - // 用户取消删除 - }); -} -// 获取处方单药品数量 -function getPrescriptionMedicineCount(prescriptionIndex) { - // 目前所有药品都在 prescriptionList 中,暂时返回总数量 - // TODO: 将来需要按处方单分组药品 - return prescriptionList.value.filter(item => item.statusEnum !== 2).length; -} -// 获取处方单总价 -function getPrescriptionTotalPrice(prescriptionIndex) { - // 目前所有药品都在 prescriptionList 中,暂时返回总价 - // TODO: 将来需要按处方单分组计算总价 - return prescriptionList.value - .filter(item => item.statusEnum !== 2) - .reduce((total, item) => total + (Number(item.totalPrice) || 0), 0) - .toFixed(2); -} -// 判断处方单是否可删除 -function isPrescriptionDeletable(prescriptionIndex) { - // 条件1:处方单没有药品 - const medicineCount = getPrescriptionMedicineCount(prescriptionIndex); - if (medicineCount > 0) { - return false; - } - - // 条件2:处方单未收费(这里需要根据实际收费状态字段判断) - // TODO: 根据实际的收费状态字段来判断 - // 暂时返回true,等有收费状态字段后再完善 - return true; -} + + + + + + + defineExpose({ getListInfo, getDiagnosisInfo });