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 6dd53e9a..a0af048b 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/tcm/tcmAdvice.vue @@ -855,36 +855,7 @@ function handleDelete() { groupMarkers.value = getGroupMarkers(prescriptionList.value); // 删除行会出现组号混乱的情况,所以这里重新更新标记 } -// 判断处方单是否可删除 -function isPrescriptionDeletable(prescriptionIndex) { - // 条件1:处方单没有药品 - const medicineCount = getPrescriptionMedicineCount(prescriptionIndex); - if (medicineCount > 0) { - return false; - } - - // 条件2:处方单未收费(已签发的处方不能删除) - // 检查是否有已签发的药品(statusEnum == 2 表示已签发) - const hasChargedItems = prescriptionList.value.some(item => item.statusEnum === 2); - if (hasChargedItems) { - return false; - } - - return true; -} -// 删除处方单 -function handleDeletePrescriptionClick(prescriptionIndex) { - if (!isPrescriptionDeletable(prescriptionIndex)) { - proxy.$modal.msgWarning('该处方单不可删除'); - return; - } - - proxy.$modal.confirm('确认删除该处方单吗?').then(() => { - tcmPrescriptionList.value.splice(prescriptionIndex, 1); - proxy.$modal.msgSuccess('删除成功'); - }).catch(() => {}); -} function handleNumberClick(item, index) { prescriptionList.value[index].unitPrice = item.price;