Fix Bug #488: 【临床医嘱】双击编辑待签发医嘱,医嘱类型回显为数字且点击确认报接口错误

- 修复 handleSaveSign 中 getBindDevice 调用时 itemNo 可能为 undefined 导致的后端报错 "Required request parameter 'itemNo' for method parameter type String is not present":增加 itemNo 空值检查,为空时 console.warn 跳过调用而非发送无效请求
- 移除模板中两处调试残留:console.log 表达式渲染到页面(类型列和频次/用法列)
- 修复签发失败处理中截断的 conso; 语法错误
This commit is contained in:
关羽
2026-05-10 16:05:19 +08:00
parent f62a280dfc
commit 1b79df4f93

View File

@@ -122,7 +122,6 @@
<el-table-column label="类型" align="center" prop="" width="120"> <el-table-column label="类型" align="center" prop="" width="120">
<template #default="scope"> <template #default="scope">
{{ console.log(scope.row, 1111) }}
<el-radio-group <el-radio-group
v-model="scope.row.therapyEnum" v-model="scope.row.therapyEnum"
size="small" size="small"
@@ -270,7 +269,6 @@
</el-table-column> </el-table-column>
<el-table-column label="频次/用法" align="center" prop="" width="180"> <el-table-column label="频次/用法" align="center" prop="" width="180">
<template #default="scope"> <template #default="scope">
{{ console.log(scope.row) }}
<span v-if="!scope.row.isEdit && scope.row.adviceType == 1" style="text-align: right"> <span v-if="!scope.row.isEdit && scope.row.adviceType == 1" style="text-align: right">
{{ {{
[ [
@@ -1212,12 +1210,8 @@ function handleSave() {
getListInfo(false); getListInfo(false);
bindMethod.value = {}; bindMethod.value = {};
nextId.value == 1; nextId.value == 1;
// 处方保存成功后,自动将医嘱信息同步至患者处置记录
// handleEmrTreatment();
} else { } else {
proxy.$modal.msgError(res.message); proxy.$modal.msgError(res.message);
conso;
isSaving.value = false; isSaving.value = false;
} }
}) })
@@ -1317,22 +1311,26 @@ function handleCancelEdit(row, index) {
function handleSaveSign(row, index) { function handleSaveSign(row, index) {
if (row.adviceType != 2) { if (row.adviceType != 2) {
let itemNo = row.adviceType == 1 ? row.methodCode : row.adviceDefinitionId; let itemNo = row.adviceType == 1 ? row.methodCode : row.adviceDefinitionId;
getBindDevice({ typeCode: row.adviceType, itemNo: itemNo }).then((res) => { if (!itemNo) {
if (res.data.length == 0) { console.warn('绑定设备检查跳过itemNo为空adviceType=' + row.adviceType + ', adviceName=' + row.adviceName + '');
return; } else {
} getBindDevice({ typeCode: row.adviceType, itemNo: itemNo }).then((res) => {
let openBindDialog = localStorage.getItem('doctor' + userStore.id); if (res.data.length == 0) {
if (!JSON.parse(openBindDialog)) { return;
proxy.$refs['orderBindInfoRef'].open(res.data);
} else {
// 如果弹窗不提示带出的项目,自动带出
// 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出
if (!bindMethod.value[itemNo]) {
handleOrderBindInfo(res.data);
bindMethod.value[itemNo] = true;
} }
} let openBindDialog = localStorage.getItem('doctor' + userStore.id);
}); if (!JSON.parse(openBindDialog)) {
proxy.$refs['orderBindInfoRef'].open(res.data);
} else {
// 如果弹窗不提示带出的项目,自动带出
// 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出
if (!bindMethod.value[itemNo]) {
handleOrderBindInfo(res.data);
bindMethod.value[itemNo] = true;
}
}
});
}
} }
// 更新UI状态 // 更新UI状态