From a69951900afb1e20fc6ff373edd3c2e179875db2 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Tue, 23 Jun 2026 17:22:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(doctorstation):=20=E4=B8=AD=E5=8C=BBtab?= =?UTF-8?q?=E9=A1=B5=E8=B4=B9=E7=94=A8=E6=80=A7=E8=B4=A8=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E6=82=A3=E8=80=85=E4=BF=A1=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E4=B8=8E=E9=97=A8=E8=AF=8A=E6=8C=82=E5=8F=B7=E5=BD=93=E6=97=A5?= =?UTF-8?q?=E5=B7=B2=E6=8C=82=E5=8F=B7=E6=95=B0=E6=8D=AE=E6=BA=90=E7=BB=9F?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DoctorStationAdviceAppMapper.xml | 6 ++-- .../components/tcm/tcmAdvice.vue | 26 ++++------------- .../components/tcm/tcmMedicineList.vue | 29 ++++++++++++------- 3 files changed, 27 insertions(+), 34 deletions(-) diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index c3d1b540c..52762a086 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -91,13 +91,13 @@ T1.dosage_instruction AS dosage_instruction, T1.chrgitm_lv as chrgitm_lv FROM med_medication_definition AS t1 - INNER JOIN med_medication AS T2 ON T2.medication_def_id = t1.ID + LEFT JOIN med_medication AS T2 ON T2.medication_def_id = t1.ID AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum} LEFT JOIN adm_supplier AS T3 ON T3.ID = t1.supply_id AND T3.delete_flag = '0' LEFT JOIN adm_charge_item_definition AS T5 ON T5.instance_id = t1.ID AND T5.delete_flag = '0' AND T5.status_enum = #{statusEnum} - INNER JOIN adm_organization_location AS T6 ON T6.distribution_category_code = t1.category_code AND T6.delete_flag = '0' AND T6.item_code = '1' AND T6.organization_id = #{organizationId} AND (CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time) + LEFT JOIN adm_organization_location AS T6 ON T6.distribution_category_code = t1.category_code AND T6.delete_flag = '0' AND T6.item_code = '1' AND T6.organization_id = #{organizationId} AND (CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time) WHERE t1.delete_flag = '0' - AND T2.status_enum = #{statusEnum} + AND (T2.status_enum = #{statusEnum} OR T2.status_enum IS NULL) diff --git a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue index 1debfa34b..62ff30454 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue @@ -103,18 +103,7 @@ /> 费用性质: - - - + {{ props.patientInfo?.contractName || '-' }} 用法: import { - getContract, getDiagnosisDefinitionList, getOrgTree, getTcmAdviceList, @@ -605,12 +593,11 @@ const props = defineProps({ }); const tableRefs = ref({}); const stockList = ref([]); -const contractList = ref([]); const tcmDiagnosisList = ref([]); const conditionId = ref(''); const checkAll = ref(false); const { proxy } = getCurrentInstance(); -const inputRefs = ref({}); // 存储输入框实例 +const inputRefs = ref({}); const requiredProps = ref([]); // 存储必填项 prop 顺序 const totalAmount = ref(0); const tcmDianosis = ref(); @@ -679,9 +666,6 @@ async function getListInfo(addNewRow) { }); }); - await getContract({ encounterId: props.patientInfo.encounterId }).then((res) => { - contractList.value = res.data; - }); // 更新处方列表 const groupIds = Object.keys(groupedData); tcmPrescriptionList.value = groupIds.map((groupId, index) => { @@ -689,7 +673,7 @@ async function getListInfo(addNewRow) { id: generatePrescriptionId(), prescriptionList: [], conditionDefinitionId: '', - accountId: contractList.value?.[0]?.accountId || '', + accountId: props.patientInfo.accountId || '', methodCode: '', rateCode: '', dispensePerDuration: '', @@ -745,7 +729,7 @@ async function getListInfo(addNewRow) { id: generatePrescriptionId(), prescriptionList: [], conditionDefinitionId: '', - accountId: contractList.value?.[0]?.accountId || '', + accountId: props.patientInfo.accountId || '', methodCode: '', rateCode: '', dispensePerDuration: '', @@ -760,7 +744,7 @@ async function getListInfo(addNewRow) { isAdding: false, }); } - tcmPrescriptionList.value.accountId = contractList.value?.[0]?.accountId || ''; + tcmPrescriptionList.value.accountId = props.patientInfo.accountId || ''; if (props.activeTab == 'prescription' && addNewRow) { handleAddMedicine(0); } diff --git a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmMedicineList.vue b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmMedicineList.vue index 57a5af2f4..393d91b6f 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmMedicineList.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmMedicineList.vue @@ -8,7 +8,7 @@ ref="adviceBaseRef" height="400" :data="filteredAdviceBaseList" - :row-config="{ keyField: 'patientId' }" + :row-config="{ keyField: 'adviceDefinitionId' }" @current-change="handleCurrentChange" @cell-click="clickRow" > @@ -78,7 +78,7 @@ const currentIndex = ref(0); // 当前选中行索引 const currentSelectRow = ref({}); const queryParams = ref({ pageSize: 100, - pageNum: 1, + pageNo: 1, }); const adviceBaseList = ref([]); @@ -126,14 +126,23 @@ getList(); function getList() { queryParams.value.organizationId = props.patientInfo.orgId; getTcmMedicine(queryParams.value).then((res) => { - adviceBaseList.value = res.data.records; - total.value = res.data.total; - nextTick(() => { - currentIndex.value = 0; - if (filteredAdviceBaseList.value.length > 0) { - adviceBaseRef.value.setCurrentRow(filteredAdviceBaseList.value[0]); - } - }); + if (res.data && res.data.records) { + adviceBaseList.value = res.data.records; + total.value = res.data.total || 0; + nextTick(() => { + currentIndex.value = 0; + if (filteredAdviceBaseList.value.length > 0) { + adviceBaseRef.value?.setCurrentRow(filteredAdviceBaseList.value[0]); + } + }); + } else { + adviceBaseList.value = []; + total.value = 0; + } + }).catch((error) => { + console.error('获取中药列表失败:', error); + adviceBaseList.value = []; + total.value = 0; }); }