Merge branch 'develop' of https://gitea.gentronhealth.com/wangyizhe/his into develop

# Conflicts:
#	openhis-ui-vue3/src/router/index.js
This commit is contained in:
chenjinyang
2026-01-09 14:07:02 +08:00
56 changed files with 8707 additions and 324 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1201,6 +1201,7 @@ function submitForm() {
form.value.patientIdInfoList = [
{
typeCode: form.value.typeCode,
identifierNo: form.value.identifierNo,
},
];
if (form.value.idCard) {
@@ -1235,6 +1236,8 @@ function submitForm() {
emits('submit', 'update');
});
} else {
// console.log('患者就诊卡号:', form.value.identifierNo)
// console.log('患者就诊信息:', form.value.patientIdInfoList)
// 新增患者
addPatient(form.value).then((response) => {
proxy.$modal.msgSuccess('新增成功');

View File

@@ -2,7 +2,7 @@
<el-dialog
title="添加中医诊断"
v-model="props.openAddDiagnosisDialog"
width="1500px"
width="1300px"
append-to-body
destroy-on-close
@open="handleOpen"

View File

@@ -1106,7 +1106,7 @@ onMounted(() => {
document.addEventListener('keydown', escKeyListener);
// 初始化时自动创建第一个西药处方
if (westernPrescriptions.value.length === 0) {
handleAddPrescription();
handleAddPrescription(null, false);
}
});
@@ -1531,7 +1531,7 @@ function getListInfo(addNewRow) {
});
getGroupMarkers(); // 更新标记
if (props.activeTab == 'prescription' && addNewRow) {
handleAddPrescription();
handleAddPrescription(null, false);
}
// 在所有异步操作完成后 resolve Promise
@@ -1595,14 +1595,16 @@ function handleSelectionChange(selection, row) {
}
// 新增医嘱
function handleAddPrescription(prescriptionId) {
function handleAddPrescription(prescriptionId, showWarning = true) {
// 如果传入了处方ID先切换到该处方
if (prescriptionId && prescriptionId !== currentPrescriptionId.value) {
switchToActivePrescription(prescriptionId);
}
if (diagnosisList.value.length == 0) {
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
if (showWarning) {
proxy.$modal.msgWarning('请先保存诊断后再开立医嘱');
}
return;
}
if (isAdding.value) {
@@ -2291,7 +2293,7 @@ function handleSaveSign(row, index, prescriptionId) {
});
} else {
if (prescriptionList.value[0].adviceName) {
handleAddPrescription();
handleAddPrescription(null, false);
}
}
adviceQueryParams.value.adviceType = undefined;

View File

@@ -145,14 +145,20 @@ const fetchAll = async () => {
}
loadingCheck.value = true;
loadingInspection.value = true;
try {
await Promise.all([fetchCheckReport(), fetchInspectionReport()]);
} catch (e) {
proxy.$modal?.msgError?.(e.message || '查询报告失败');
} finally {
loadingCheck.value = false;
loadingInspection.value = false;
}
// 独立处理,互不影响
const runFetch = async (fn, loadingRef, name) => {
try {
await fn();
} catch (e) {
proxy.$modal?.msgError?.(`${name}查询失败: ${e.message || '未知错误'}`);
} finally {
loadingRef.value = false;
}
};
runFetch(fetchCheckReport, loadingCheck, '检查报告');
runFetch(fetchInspectionReport, loadingInspection, '检验报告');
};
const handleRefreshCheck = async () => {

View File

@@ -893,7 +893,7 @@ function selectAdviceBase(key, row, pIndex) {
).chargeItemDefinitionId;
// 库存列表 + 价格列表拼成批次号的下拉框
if (row.adviceType != 3) {
if (row.adviceType == 1 || row.adviceType == 2) {
if (row.inventoryList && row.inventoryList.length == 0) {
prescription.expandOrder = [];
proxy.$modal.msgWarning('该项目无库存');
@@ -1069,23 +1069,32 @@ function handleSaveSign(row, index, pIndex) {
const prescription = tcmPrescriptionList.value[pIndex];
const formRefName = 'formRef' + pIndex + '-' + index;
proxy.$refs[formRefName][0].validate((valid) => {
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.conditionId = prescription.conditionId;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
row.contentJson = JSON.stringify(row);
if (valid) {
row.isEdit = false;
prescription.isAdding = false;
prescription.expandOrder = [];
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = prescription.accountId;
row.quantity = row.minUnitQuantity;
row.chineseHerbsDoseQuantity = prescription.chineseHerbsDoseQuantity;
row.unitPrice =
row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit'
? row.unitPrice
: new Decimal(row.unitPrice).div(row.partPercent).toFixed(2);
row.conditionDefinitionId = prescription.conditionDefinitionId;
row.encounterDiagnosisId = prescription.encounterDiagnosisId;
row.diagnosisName = prescription.diagnosisName;
// 寻找当前选中的单位字典值
const selectedUnit = row.unitCodeList.find((item) => item.value === row.minUnitCode);
if (selectedUnit) {
row.doseUnitCode_dictText = selectedUnit.label;
}
row.contentJson = JSON.stringify(row);
}
});
}

View File

@@ -205,7 +205,7 @@
</template>
<script setup>
import { ref, reactive, onMounted, defineEmits, defineExpose } from 'vue'
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
VideoPlay, CircleCheck, Close, View, Delete

View File

@@ -78,7 +78,7 @@
</template>
<script setup>
import { ref, onMounted, defineEmits, defineExpose } from 'vue'
import { ref, onMounted } from 'vue'
import { User, Clock, VideoPlay, CircleCheck, Timer, Watch } from '@element-plus/icons-vue'
import { getTodayOutpatientStats } from './api.js'

View File

@@ -822,7 +822,7 @@
</template>
<script setup>
import {defineExpose, reactive, ref} from 'vue';
import {reactive, ref} from 'vue';
const bodyRef = ref();
// 响应式表单数据

View File

@@ -34,7 +34,7 @@
<script setup>
import {getPatientList, getWardList} from './api';
import {updatePatientInfoList} from './store/patient';
import {defineExpose, inject, nextTick, ref} from 'vue';
import {inject, nextTick, ref} from 'vue';
const treeRef = ref(null);
const searchKey = ref('');