759 【门诊医生工作站】电子处方点击新增处方,报卡在100%卡出屏幕且诊断等下拉框无数据回显

This commit is contained in:
wangjian963
2026-06-18 10:42:52 +08:00
parent e40695224c
commit 67f1baf04a
4 changed files with 61 additions and 26 deletions

View File

@@ -67,6 +67,11 @@ public class ElepMedicationInfoDto {
/** 诊断id */
@JsonSerialize(using = ToStringSerializer.class)
private Long conditionId;
/** 诊断定义id */
@JsonSerialize(using = ToStringSerializer.class)
private Long conditionDefId;
/** 慢病诊断编码 */
private String opspDiseCode;
/** 药品版本号 */
private String version;
}

View File

@@ -400,6 +400,8 @@
T1.rx_type_code, --处方类别
T1.rx_item_type_code, --处方项目类别
T1.condition_id, --诊断id
T1.condition_def_id, --诊断定义id
T1.opsp_dise_code, --慢病诊断编码
T1.version --药品版本号
FROM elep_medication_request AS T1
LEFT JOIN yb_catalog_drug_info AS T2
@@ -427,6 +429,8 @@
T1.rx_type_code,
T1.rx_item_type_code,
T1.condition_id,
T1.condition_def_id,
T1.opsp_dise_code,
T1.version
</select>
<select id="selectSaveInfo" resultType="com.healthlink.his.web.doctorstation.dto.ElepPrescriptionInfoParam">

View File

@@ -1,8 +1,9 @@
<template>
<el-dialog
v-model="props.openPrescription"
:title="title"
width="1840px"
:model-value="props.openPrescription"
@update:model-value="$emit('update:openPrescription', $event)"
:title="dialogTitle"
width="95%"
teleported
destroy-on-close
@open="open"
@@ -227,7 +228,7 @@
title="药品名称"
align="center"
field="medicationName"
width="150"
min-width="110"
>
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
@@ -237,7 +238,7 @@
placement="bottom-start"
:visible="scope.row.showPopover"
trigger="manual"
:width="1200"
:width="800"
>
<prescriptionMedicineList
:search-key="medicineSearchKey"
@@ -250,7 +251,6 @@
@input="handleChange"
@focus="handleFocus(scope.row, scope.rowIndex)"
/>
<!-- @blur="handleBlur(scope.row)" -->
</template>
</el-popover>
</el-form-item>
@@ -262,7 +262,7 @@
title="药品规格"
align="center"
field=""
width="100"
min-width="90"
>
<template #default="scope">
<el-form-item :prop="`medicationInfoList.${scope.rowIndex}.drugSpecification`">
@@ -282,7 +282,8 @@
title="生产厂家"
align="center"
field=""
width="220"
min-width="120"
:show-overflow="true"
>
<template #default="scope">
<el-form-item :prop="`medicationInfoList.${scope.rowIndex}.manufacturerName`">
@@ -308,7 +309,7 @@
title="药品剂量"
align="center"
field=""
width="80"
min-width="100"
>
<template #default="scope">
<el-form-item
@@ -331,7 +332,7 @@
title="剂量单位"
align="center"
field="medDosageUnitCode"
width="150"
min-width="90"
>
<template #default="scope">
<el-form-item
@@ -371,7 +372,7 @@
title="使用频次"
align="center"
field="medFrequency"
width="230"
min-width="130"
>
<template #default="scope">
<el-form-item
@@ -404,7 +405,7 @@
title="服药时间(开始)"
align="center"
field="effectiveDoseStart"
width="220"
min-width="140"
>
<template #default="scope">
<el-form-item
@@ -429,7 +430,7 @@
title="每次发药供应天数"
align="center"
field="dispensePerDuration"
width="130"
min-width="140"
>
<template #default="scope">
<el-form-item
@@ -450,7 +451,7 @@
title="服药时间(结束)"
align="center"
field="effectiveDoseEnd"
width="220"
min-width="140"
>
<template #default="scope">
<el-form-item :prop="`medicationInfoList.${scope.rowIndex}.effectiveDoseEnd`">
@@ -472,7 +473,7 @@
title="途径"
align="center"
field="medRoute"
width="140"
min-width="90"
>
<template #default="scope">
<el-form-item
@@ -502,6 +503,7 @@
title="数量"
align="center"
field="quantity"
min-width="90"
>
<template #default="scope">
<el-form-item
@@ -524,7 +526,7 @@
title="单位"
align="center"
field="medDosageUnitCode"
width="150"
min-width="90"
>
<template #default="scope">
<el-form-item
@@ -702,7 +704,7 @@ const queryMedicationParams = ref({
const dosageInputRefs = ref([]);
const title = ref('');
const dialogTitle = ref('');
const unitMap = ref({
dose: 'dose',
@@ -720,6 +722,17 @@ function getInit(searchKey) {
function open() {
conditionId.value = props.prescriptionData.conditionId;
// 编辑/查看时回显诊断和慢病诊断
if (dialogTitle.value !== '新增处方') {
conditionDefId.value = props.prescriptionData.conditionDefId || '';
speConditionId.value = props.prescriptionData.opspDiseCode || '';
// 远程搜索诊断下拉框:加载当前已选诊断的选项,确保 label 正常显示
if (conditionDefId.value) {
getDiagnosisListEle('', infoForm.encounterId).then(res => {
diagnosisListOption.value = res.data || [];
});
}
}
getDiagnosisInfo();
}
@@ -728,22 +741,22 @@ function open() {
*/
function getPrescriptionNoInit() {
reset();
title.value = '';
title.value = props.title;
console.log(props, 'props', title.value);
dialogTitle.value = '';
dialogTitle.value = props.title;
console.log(props, 'props', dialogTitle.value);
prescriptionTypeList.value = props.prescriptionType;
console.log(prescriptionTypeList.value, 'prescriptionTypeList');
infoForm.patientId = props.patient.patientId;
infoForm.encounterId = props.patient.encounterId;
infoForm.validityDays = props.prescriptionData.validityDays;
infoForm.extensionReason = props.prescriptionData.extensionReason;
if (title.value != '新增处方') {
if (dialogTitle.value != '新增处方') {
form.rxTypeCode = props.prescriptionData.rxTypeCode;
infoForm.prescriptionNo = props.prescriptionData.prescriptionNo;
}
console.log('infoForm.prescriptionNo (初始值):', infoForm.prescriptionNo, 'props.prescriptionData:', props.prescriptionData);
// prescriptionInfo.value = props.prescriptionData;
if (title.value === '新增处方') {
if (dialogTitle.value === '新增处方') {
prescriptionNoInit().then((res) => {
infoForm.prescriptionNo = res.data;
console.log('处方号初始化成功:', {
@@ -767,7 +780,7 @@ function getDiagnosisInfo() {
});
if (diagnosisInfo.length > 0) {
diagnosisInfo.value = diagnosisInfo[0];
if (title.value === '新增处方') {
if (dialogTitle.value === '新增处方') {
conditionId.value = diagnosisInfo[0].id;
}
}
@@ -973,7 +986,7 @@ function submit() {
* 双击药品行
*/
function clickMedicineRowDb(row) {
if (title.value == '查看处方') {
if (dialogTitle.value == '查看处方') {
row.isEdit = false;
} else {
row.isEdit = true;

View File

@@ -57,6 +57,7 @@
title="门诊号"
align="center"
field="iptOtpNo"
min-width="120"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -68,6 +69,8 @@
title="病区"
align="center"
field="departmentWard"
min-width="90"
:show-overflow="true"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -79,7 +82,7 @@
title="有效天数"
align="center"
field="validityDays"
width="80"
min-width="100"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -138,7 +141,7 @@
title="取药状态"
align="center"
field="medStatus"
width="80"
min-width="100"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -150,6 +153,8 @@
title="延长原因"
align="center"
field="extensionReason"
min-width="90"
:show-overflow="true"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -166,6 +171,8 @@
title="撤销原因"
align="center"
field="quashReason"
min-width="90"
:show-overflow="true"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -177,6 +184,8 @@
title="诊断"
align="center"
field="conditionName"
min-width="130"
:show-overflow="true"
>
<template #default="scope">
<span v-if="!scope.row.isEdit">
@@ -435,6 +444,8 @@ function handleView(row) {
});
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
prescriptionInfo.value.conditionDefId = response.data.records[0].conditionDefId;
prescriptionInfo.value.opspDiseCode = response.data.records[0].opspDiseCode;
openPrescriptionDialog();
});
@@ -458,6 +469,8 @@ function handleEdit(row) {
medicationInfo.isEdit = false;
});
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
prescriptionInfo.value.conditionDefId = response.data.records[0].conditionDefId;
prescriptionInfo.value.opspDiseCode = response.data.records[0].opspDiseCode;
openPrescriptionDialog();
});
}