库房管理->采购管理->采购管理点击《详情》按钮跳转后无数据显示

This commit is contained in:
qk123
2025-11-27 12:00:21 +08:00
parent 6dc6480e64
commit 88d79729fe
5 changed files with 26 additions and 12 deletions

View File

@@ -1451,11 +1451,13 @@ function getDiagnosisInfo() {
let diagnosisInfo = diagnosisList.value.filter((item) => {
return item.maindiseFlag == 1;
});
diagnosisInfo.value = diagnosisInfo[0];
conditionDefinitionId.value = diagnosisInfo[0].definitionId;
conditionId.value = diagnosisInfo[0].conditionId;
encounterDiagnosisId.value = diagnosisInfo[0].encounterDiagnosisId;
diagnosisName.value = diagnosisInfo[0].name;
if (diagnosisInfo.length > 0) {
diagnosisInfo.value = diagnosisInfo[0];
conditionDefinitionId.value = diagnosisInfo[0].definitionId;
conditionId.value = diagnosisInfo[0].conditionId;
encounterDiagnosisId.value = diagnosisInfo[0].encounterDiagnosisId;
diagnosisName.value = diagnosisInfo[0].name;
}
});
}

View File

@@ -765,10 +765,16 @@ watch(
if (newVlaue) {
editData.value.editRow = newVlaue?.editRow;
editData.value.item = newVlaue?.item;
edit();
// 使用nextTick确保变量初始化完成后再执行edit
nextTick(() => {
edit();
});
} else {
editData.value = {};
show();
// 使用nextTick确保变量初始化完成后再执行show
nextTick(() => {
show();
});
}
},
{ immediate: true }
@@ -1156,6 +1162,12 @@ function changeValEnd(val, index) {
}
// 切换仓库类型获取药房/药库/耗材库列表
function handleChangeLocationType(value) {
// 确保locationList变量已初始化
if (!locationList) {
console.warn('locationList未初始化');
return;
}
if (value == 16) {
// 药房类型
getPharmacyList().then((res) => {

View File

@@ -590,6 +590,7 @@ const visible = ref(false);
const row = ref({});
const rowIndex = ref(-1);
const totalAmount = ref(0);
const locationList = ref([]);
const props = defineProps({
practitionerListOptions: {
type: Object,
@@ -768,7 +769,6 @@ function handleSearch(value) {
medicineSearchKey.value = value;
}
const locationList = ref([]);
// 选择药品
function selectRow(rowValue, index) {
rowIndex.value = index;