@@ -314,7 +314,7 @@
border
@ cell -click = " clickRow "
@ cell -dblclick = " clickRowDb "
@select =" handleSelectionChange"
@ checkbox -change = " handleSelectionChange "
>
< vxe-column
type = "expand"
@@ -333,7 +333,7 @@
style = "padding: 16px; background: #f8f9fa; border-radius: 8px"
>
< template v-if = "scope.row.adviceType == 1" >
< div style = "display: flex; align-items: center; margin-bottom: 16px; gap: 16px" >
< div style = "display: flex; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: nowrap " >
< span class = "medicine-title" >
{ {
scope . row . adviceName +
@@ -411,9 +411,8 @@
} }
< / span >
< / div >
< div style = "display: flex; align-items: center; gap: 12px; flex-wrap: wrap " >
< div class = "form-group" >
<!-- 单次剂量 -- >
< div class = "e dit-form-row " >
<!-- 单次用量 -- >
< el-form-item
label = "单次用量:"
prop = "doseQuantity"
@@ -426,7 +425,7 @@
:min = "0"
controls -position = " right "
:controls = "false"
style = "width: 70px; margin-right: 20px "
style = "width: 70px"
@input ="convertValues(scope.row, scope.rowIndex)"
@keyup.enter.prevent ="handleEnter('doseQuantity', scope.row, scope.rowIndex)"
@change ="calculateTotalAmount(scope.row, scope.rowIndex)"
@@ -435,7 +434,7 @@
<!-- 剂量单位 -- >
< el-select
v-model = "scope.row.minUnitCode"
style = "width: 70px; margin-right: 20px "
style = "width: 70px"
placeholder = " "
>
< template
@@ -461,7 +460,7 @@
v-model = "scope.row.dose"
controls -position = " right "
:controls = "false"
style = "width: 70px; margin: 0 20px "
style = "width: 70px"
@input ="convertDoseValues(scope.row, scope.rowIndex)"
@keyup.enter.prevent ="handleEnter('dose', scope.row, scope.rowIndex)"
/ >
@@ -480,8 +479,6 @@
:label = "item.label"
/ >
< / el-select >
< / div >
< div class = "form-group" >
< el-form-item
label = "给药途径:"
prop = "methodCode"
@@ -530,7 +527,6 @@
if (scope.row.rateCode) {
handleEnter('rateCode', scope.row, scope.rowIndex);
}
// inputRefs.rateCode.blur();
}
"
@change ="calculateTotalAmount(scope.row, scope.rowIndex)"
@@ -544,18 +540,8 @@
/ >
< / el-select >
< / el-form-item >
< / div >
< / div >
< div
style = "
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
margin-top: 10px;
"
>
< div class = "form-group" >
< div class = "edit-form-row" >
< el-form-item
label = "用药天数:"
prop = "dispensePerDuration"
@@ -580,7 +566,6 @@
< / template >
< / el-input-number >
< / el-form-item >
< el-form-item
label = "总量:"
prop = "quantity"
@@ -600,7 +585,7 @@
< el-form-item >
< el-select
v-model = "scope.row.unitCode"
style = "width: 70px; margin-right: 20px "
style = "width: 70px"
placeholder = " "
@change ="calculateTotalAmount(scope.row, scope.rowIndex)"
>
@@ -633,50 +618,34 @@
< / template >
< / el-select >
< / el-form-item >
< / div >
< / div >
< div
style = "
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
margin-top: 10px;
"
>
< div class = "form-group" >
< el-form-item
label = "备注:"
prop = "remarks"
style = "margin: 0; margin-right: 20px"
>
< el-input
v-model = "scope.row.remarks"
placeholder = "请输入备注"
maxlength = "100"
show -word -limit
style = "width: 5 00px"
style = "width: 3 00px"
/ >
< / el-form-item >
< / div >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< el-button
@click ="handleCancelEdit(scope.row, scope.rowIndex)"
>
取消
< / el-button >
< / div >
< / template >
<!-- 🔧 Bug # 147 修复 : 耗材类型 ( adviceType = 4 ) 的编辑模板 -- >
< template v-else-if = "scope.row.adviceType == 4" >
< div
style = "
display: flex;
align-items: center;
margin-bottom: 16px;
gap: 16px;
"
>
< div class = "edit-form-row" >
< span class = "medicine-title" >
{ {
scope . row . adviceName +
@@ -711,7 +680,7 @@
< el-form-item >
< el-select
v-model = "scope.row.unitCode"
style = "width: 70px; margin-right: 20px "
style = "width: 70px"
placeholder = " "
@change ="calculateTotalAmount(scope.row, scope.rowIndex)"
>
@@ -723,7 +692,6 @@
v-if = "item.type != unitMap['dose']"
:value = "item.value"
:label = "item.label"
style = "width: 70px; margin-right: 20px"
@click ="
() => {
scope.row.unitCode_dictText = item.label;
@@ -750,23 +718,21 @@
: '0.00 元'
} }
< / span >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< el-button
@click ="handleCancelEdit(scope.row, scope.rowIndex)"
>
取消
< / el-button >
< / div >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< / template >
< template v-else-if = "scope.row.adviceType == 2" >
< div
style = "
display: flex;
align-items: center;
margin-bottom: 16px;
gap: 16px;
"
>
< div class = "edit-form-row" >
< span class = "medicine-title" >
{ {
scope . row . adviceName +
@@ -801,7 +767,7 @@
< el-form-item >
< el-select
v-model = "scope.row.unitCode"
style = "width: 70px; margin-right: 20px "
style = "width: 70px"
placeholder = " "
@change ="calculateTotalAmount(scope.row, scope.rowIndex)"
>
@@ -813,7 +779,6 @@
v-if = "item.type != unitMap['dose']"
:value = "item.value"
:label = "item.label"
style = "width: 70px; margin-right: 20px"
@click ="
() => {
scope.row.unitCode_dictText = item.label;
@@ -853,17 +818,22 @@
: '0.00 元'
} }
< / span >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< el-button
@click ="handleCancelEdit(scope.row, scope.rowIndex)"
>
取消
< / el-button >
< / div >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< / template >
< template v-else >
< div style = "display: flex; align-items: center; margin-bottom: 16px; gap: 16px " >
< span style = "font-size: 16px; font-weight: 600" >
< div class = "e dit-form-row " >
< span style = "font-size: 16px; font-weight: 600; white-space: nowrap " >
{ { scope . row . adviceName } }
{ {
( scope . row . unitPrice !== undefined && scope . row . unitPrice !== null && ! isNaN ( scope . row . unitPrice ) &&
@@ -872,61 +842,63 @@
: '-' + '元'
} }
< / span >
< div class = "form-group" >
< el-form-item
label = "执行次数: "
prop = "quantity "
class = "required-field "
data -prop = " quantity "
>
< el-input-number
: ref = "(el) => (inputRefs .quantity = el) "
v-mo del = "scope.row.quantity "
placeholder = "执行次数 "
style = "width: 100px; margin: 0 20px "
controls -position = " right "
:controls = "false "
@keyup.enter.prevent ="handleEnter('quantity', scope.row, scope.rowIndex)"
@input ="calculateTotalPrice(scope.row, scope.rowIndex)"
/ >
< / el-form-item >
< el-form-item
label = "执行科室: "
prop = "orgI d"
class = "required-field "
data -prop = " orgId "
>
< el-tree-select
: ref = "(el) => (inputRefs.orgId = el) "
v-model = "scope.row.orgId"
clearable
style = "width: 200px "
:data = "organization "
: props = "{ value: 'id', label: 'name', children: 'children' } "
value -key = " id "
check -strictly
default -expand -all
placeholder = "请选择执行科室 "
@change ="(value) => handleOrgChange(value, scope.rowIndex, scope.row)"
/ >
< / el-form-item >
< span class = "total-amount" >
总金额 :
{ {
( scope . row . totalPrice !== undefined && scope . row . totalPrice !== null &&
! isNaN ( scope . row . totalPrice ) && isFinite ( scope . row . totalPrice ) )
? Number ( scope . row . totalPrice ) . toFixed ( 2 ) + ' 元'
: '0.00 元'
} }
< / span >
<!-- 金额 : { { scope . row . priceList [ 0 ] . price } } -- >
< / div >
< el-form-item
label = "执行次数:"
prop = "quantity "
class = "required-field "
data -prop = " quantity "
>
< el-input-number
: ref = "(el) => (inputRefs.quantity = el)"
v-model = "scope.row .quantity"
placehol der = "执行次数 "
style = "width: 100px "
controls -position = " right "
: controls= "false "
@keyup.enter.prevent ="handleEnter('quantity', scope.row, scope.rowIndex) "
@input ="calculateTotalPrice( scope.row, scope.rowIndex)"
/ >
< / el-form-item >
< el-form-item
label = "执行科室:"
prop = "orgId "
class = "required-fiel d"
data -prop = " orgId "
>
< el-tree-select
: ref = "(el) => (inputRefs.orgId = el)"
v-model = "scope.row.orgId "
clearable
style = "width: 200px"
:data = "organization "
: props = "{ value: 'id', label: 'name', children: 'children' } "
value -key = " id "
check -strictly
default -expand -all
placeholder = "请选择执行科室"
@change ="(value) => handleOrgChange(value, scope.rowIndex, scope.row) "
/ >
< / el-form-item >
< span class = "total-amount" >
总金额 :
{ {
( scope . row . totalPrice !== undefined && scope . row . totalPrice !== null &&
! isNaN ( scope . row . totalPrice ) && isFinite ( scope . row . totalPrice ) )
? Number ( scope . row . totalPrice ) . toFixed ( 2 ) + ' 元'
: '0.00 元'
} }
< / span >
< el-button
type = "primary"
@click ="handleSaveSign(scope.row, scope.rowIndex)"
>
确定
< / el-button >
< el-button
@click ="handleCancelEdit(scope.row, scope.rowIndex)"
>
取消
< / el-button >
< / div >
< / template >
< / div >
@@ -1161,19 +1133,21 @@
title=" 单次剂量 "
align=" center "
field=" "
width=" 12 0 "
width=" 16 0 "
>
<template #default=" scope ">
<template v-if=" scope . row . isEdit ">
<el-input-number
v-model=" scope . row . dose "
:min=" 0 "
:precisio n=" 2 "
:controls=" false "
style=" width : 70 px "
size=" small "
/>
<span style=" margin - left : 4 px ">{{ scope.row.doseUnitCode_dictText }}</span >
<div style=" display : flex ; align - items : center ; white - space : nowrap ; ">
<el-input-number
v-model=" scope . row . dose "
:mi n=" 0 "
:precision=" 2 "
:controls=" false "
style=" width : 80 px "
size=" small "
/ >
<span style=" margin - left : 4 px ">{{ scope.row.doseUnitCode_dictText }}</span>
</div>
</template>
<span v-else>
{{
@@ -1192,21 +1166,23 @@
title=" 总量 "
align=" center "
field=" "
width=" 10 0 "
width=" 14 0 "
>
<template #default=" scope ">
<template v-if=" scope . row . isEdit ">
<el-input-number
v-model=" scope . row . quantity "
:min=" 1 "
:precisio n=" 0 "
:controls=" false "
style=" width : 60 px "
size=" small "
@change=" calculateTotalPrice ( scope . row , scope . rowIndex ) "
@input =" calculateTotalPrice ( scope . row , scope . rowIndex ) "
/>
<span style=" margin - left : 4 px ">{{ resolveTotalQuantityUnit(scope.row) }}</span >
<div style=" display : flex ; align - items : center ; white - space : nowrap ; ">
<el-input-number
v-model=" scope . row . quantity "
:mi n=" 1 "
:precision=" 0 "
:controls=" false "
style=" width : 70 px "
size=" small "
@change =" calculateTotalPrice ( scope . row , scope . rowIndex ) "
@input=" calculateTotalPrice ( scope . row , scope . rowIndex ) "
/ >
<span style=" margin - left : 4 px ">{{ resolveTotalQuantityUnit(scope.row) }}</span>
</div>
</template>
<span v-else>
{{ formatTotalQuantityWithUnit(scope.row) }}
@@ -1578,6 +1554,19 @@ const orderGroupLoaded = ref({
const updateExpandOrder = (keys) => {
expandOrder.value = keys;
};
// 收起所有展开行( vxe-table v4: expandRowKeys只在初始化生效, 必须调实例方法收起行)
function collapseAllExpanded() {
expandOrder.value = [];
if (prescriptionRef.value?.clearRowExpand) {
prescriptionRef.value.clearRowExpand();
} else if (prescriptionRef.value?.setRowExpand) {
const allRows = prescriptionRef.value.getData?.() || [];
if (allRows.length > 0) {
prescriptionRef.value.setRowExpand(allRows, false);
}
}
}
const stockList = ref([]);
const contractList = ref([]);
const conditionId = ref('');
@@ -1766,7 +1755,7 @@ watch(
nextTick(() => {
const index = prescriptionList.value.findIndex((row) => row.uniqueKey === newValue[0]);
const items = proxy.$refs['formRef' + index]?.$el?.querySelectorAll('[data-prop]');
requiredProps.value = Array.from(items).map((item) => item.dataset.prop);
requiredProps.value = items ? Array.from(items).map((item) => item.dataset.prop) : [] ;
});
} else {
requiredProps.value = {};
@@ -1878,7 +1867,7 @@ function handlePrintCommand(command) {
// 智能打印 - 根据选中数据的adviceType自动选择打印方式
async function printPrescription() {
// const selectedRows = prescriptionList.value.filter((item) => item.check);
const selectedRows = prescriptionRef.value.getSelectionRow s();
const selectedRows = prescriptionRef.value.getCheckboxRecord s();
console.log('123456selectedRows', selectedRows);
if (selectedRows.length === 0) {
ElMessage.warning('未选择要打印的项目,请重新选择,打印失败');
@@ -2005,7 +1994,7 @@ async function printPrescription() {
// 处方打印 - 专门打印处方类型的数据
async function prescriptionPrint() {
// const selectedRows = prescriptionList.value.filter((item) => item.check);
const selectedRows = prescriptionRef.value.getSelectionRow s();
const selectedRows = prescriptionRef.value.getCheckboxRecord s();
if (selectedRows.length === 0) {
ElMessage.warning('未选择要打印的项目,请重新选择,打印失败');
return;
@@ -2088,7 +2077,7 @@ async function prescriptionPrint() {
async function disposalPrint() {
console.log('处置打印开始');
// const selectedRows = prescriptionList.value.filter((item) => item.check);
const selectedRows = prescriptionRef.value.getSelectionRow s();
const selectedRows = prescriptionRef.value.getCheckboxRecord s();
if (selectedRows.length === 0) {
ElMessage.warning('未选择要打印的项目,请重新选择,打印失败');
return;
@@ -2357,14 +2346,17 @@ function getDiagnosisInfo() {
}
// 选择框改变时的处理
function handleSelectionChange(selection, row) {
const isSelected = selection.some((item) => item.uniqueKey === row.uniqueKey) ;
function handleSelectionChange({ checked, selection, row } ) {
if (!row) return ;
// 优先使用selection, 回退到checked( 兼容不同vxe-table版本)
const isSelected = selection ? selection.some((item) => item.uniqueKey === row.uniqueKey) : !!checked;
if (!row.groupId) return;
prescriptionList.value
.filter((item) => {
return item.groupId && item.groupId == row? .groupId;
return item.groupId && item.groupId == row.groupId && item.uniqueKey !== row.uniqueKey ;
})
.forEach((row ) => {
prescriptionRef.value.toggleCheckboxRow(row , isSelected);
.forEach((item ) => {
prescriptionRef.value.toggleCheckboxRow(item , isSelected);
});
}
@@ -2421,7 +2413,7 @@ function handleAddPrescription(prescriptionId, showWarning = true) {
});
getGroupMarkers();
nextTick(() => {
const adviceRefName = 'adviceRef_ ' + (prescriptionId || currentPrescriptionId.value) + '_0' ;
const adviceRefName = 'adviceRef' + 0 ;
const adviceRef = proxy.$refs[adviceRefName];
if (adviceRef && adviceRef.focus) {
adviceRef.focus();
@@ -2521,7 +2513,11 @@ function handleFocus(row, index) {
function handleBlur(row) {
setTimeout(() => {
row.showPopover = false;
// 通过uniqueKey找到当前行, 确保popover关闭
const currentRow = prescriptionList.value.find(r => r.uniqueKey === row.uniqueKey);
if (currentRow) {
currentRow.showPopover = false;
}
}, 200);
}
@@ -2620,32 +2616,38 @@ function selectAdviceBase(key, row) {
async function setNewRow(key, row) {
console.log('[BugFix] setNewRow - row.adviceType:', row.adviceType, 'row.adviceType_dictText:', row.adviceType_dictText, 'row.adviceTableName:', row.adviceTableName);
// 每次选择药品时,将当前行数据完全重置,清空所有旧数据
const preservedData = {
uniqueKey: prescriptionList.value[rowIndex.value].uniqueKey,
isEdit: true,
statusEnum: 1,
showPopover: false, // 确保popover关闭
};
// 不再替换行对象引用, 保持vxe-table的行引用不变, 确保插槽模板正确响应数据更新
const currentRow = prescriptionList.value[rowIndex.value];
if (!currentRow) return;
// 保持编辑状态
currentRow.isEdit = true;
currentRow.statusEnum = 1;
// 立即设置adviceName, 确保输入框即时显示选中项名称
currentRow.adviceName = row.adviceName;
currentRow.showPopover = false;
// 完全替换整个对象,只保留必要的初始字段
prescriptionList.value[rowIndex.value] = preservedData;
setValue(row);
await setValue(row);
console.log('[BugFix] setNewRow after setValue - prescriptionList[rowIndex].adviceType:', prescriptionList.value[rowIndex.value].adviceType, 'adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText);
// 🔧 Bug #220 修复: 确保在setValue之后重新计算耗材类型的总金额
// 耗材(adviceType=4)和诊疗(adviceType=3)需要重新计算以确保显示正确
const currentRow = prescriptionList.value[rowIndex.value];
if (currentRow && (currentRow.adviceType == 3 || currentRow.adviceType == 4)) {
if ( currentRow.adviceType == 3 || currentRow.adviceType == 4) {
calculateTotalPrice(currentRow, rowIndex.value);
}
// 确保在setValue之后再次设置showPopover为false, 防止被覆盖
prescriptionList.value[rowIndex.value] .showPopover = false;
currentRow .showPopover = false;
expandOrder.value = [key];
// vxe-table v4: expandRowKeys只在初始化生效, 必须调实例方法展开行
await nextTick();
if (prescriptionRef.value?.setRowExpand) {
const rowObj = prescriptionList.value.find(item => item.uniqueKey === key);
if (rowObj) {
prescriptionRef.value.setRowExpand([rowObj], true);
}
}
// 自动聚焦到单次用量字段 - 使用 async/await 多次尝试
await nextTick();
@@ -2719,7 +2721,7 @@ function getInspectionApplyNoFromAdviceRow(row) {
}
function handleDelete() {
let selectRows = prescriptionRef.value.getSelectionRow s();
let selectRows = prescriptionRef.value.getCheckboxRecord s();
console.log('BugFix#219: handleDelete called, selectRows=', selectRows);
if (selectRows.length == 0) {
@@ -2885,7 +2887,7 @@ function handleDelete() {
console.log('BugFix#219: 普通医嘱删除列表, deleteList=', deleteList.length, 'sum=', sum);
handleEmrTreatment();
updateExpandOrder([] );
collapseAllExpanded( );
isAdding.value = false;
adviceQueryParams.value.adviceTypes = undefined; // 🎯 修复:改为 adviceTypes( 复数)
@@ -3000,11 +3002,11 @@ function handleSave(prescriptionId) {
if (prescriptionList.value[0]?.isEdit && !prescriptionList.value[0].adviceType) {
prescriptionList.value.shift();
isAdding.value = false;
updateExpandOrder([] );
collapseAllExpanded( );
}
// --- 【修改点1: 优先获取选中行】 ---
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getSelectionRow s() : [];
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getCheckboxRecord s() : [];
let sourceList = [];
// 如果用户有勾选,只处理勾选的;否则处理当前列表所有数据
@@ -3498,6 +3500,19 @@ function handleSkinTest(selectRows) {
);
}
// 取消编辑 - 关闭展开区域
function handleCancelEdit(row, index) {
if (isAdding.value && !row.requestId) {
// 新增行取消:移除该行
prescriptionList.value.splice(index, 1);
isAdding.value = false;
} else {
// 已有行取消:恢复非编辑状态
row.isEdit = false;
}
collapseAllExpanded();
}
// 单行处方保存
function handleSaveSign(row, index, prescriptionId) {
// 如果传入了处方ID, 先切换到该处方
@@ -3582,7 +3597,7 @@ function handleSaveSign(row, index, prescriptionId) {
}
row.isEdit = false;
isAdding.value = false;
updateExpandOrder([] );
collapseAllExpanded( );
row.contentJson = undefined;
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
@@ -3753,7 +3768,7 @@ function handleSaveBatch(prescriptionId) {
// --- 【修改开始:优先使用选中行】 ---
// 1. 获取表格当前选中的行
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getSelectionRow s() : [];
const selectedRows = prescriptionRef.value ? prescriptionRef.value.getCheckboxRecord s() : [];
// 2. 确定数据源
// 逻辑:如果用户有勾选,就只处理勾选的;如果没勾选,就处理所有数据(一键保存)
@@ -4053,22 +4068,34 @@ async function setValue(row) {
? (typeof row.skinTestFlag === 'number' ? row.skinTestFlag : (row.skinTestFlag ? 1 : 0))
: 0;
// 创建一个新的对象,而不是合并旧数据,以避免残留数据问题
// 不再替换行对象引用, 保持vxe-table的行引用不变, 确保插槽模板正确响应数据更新
console.log('[BugFix] setValue - row.adviceType:', row.adviceType, 'row.adviceType_dictText:', row.adviceType_dictText, 'row.adviceTableName:', row.adviceTableName);
prescriptionList.value[rowIndex.value] = {
...JSON.parse(JSON. str ingify(row)),
// 确保adviceType为数字类型, 避免类型不匹配导致的显示问题
adviceType: Number(row.adviceType),
// 🔧 Bug Fix: 确保adviceType_dictText被正确设置, 避免展开行时显示错误
adviceType_dictText: row.adviceType_dictText || mapAdviceTypeLabel(row.adviceType, row.adviceTableName),
skinTestFlag: skinTestFlag, // 确保皮试字段是数字类型
skinTestFlag_enumText: skinTestFlag == 1 ? '是' : '否', // 更新显示文本
// 保留原来设置的初始状态值
uniqueKey: prescriptionList.value[rowIndex.value].uniqueKey,
isEdit: prescriptionList.value[rowIndex.value].isEdit,
statusEnum: prescriptionList.value[rowIndex.value].statusEnum,
showPopover: false, // 确保查询框关闭
};
const existingRow = prescriptionList.value[rowIndex.value];
if (!exi stingRow) return;
// 保存需要保留的字段
const preservedKey = existingRow.uniqueKey;
const preservedIsEdit = existingRow.isEdit;
const preservedStatus = existingRow.statusEnum;
// 清除行上所有自有属性(避免残留旧数据)
Object.keys(existingRow).forEach(key => {
delete existingRow[key];
});
// 从选中项复制所有属性到现有行对象
const rowData = JSON.parse(JSON.stringify(row));
Object.assign(existingRow, rowData);
// 覆盖需要特殊处理的字段
existingRow.adviceType = Number(row.adviceType);
existingRow.adviceType_dictText = row.adviceType_dictText || mapAdviceTypeLabel(row.adviceType, row.adviceTableName);
existingRow.skinTestFlag = skinTestFlag;
existingRow.skinTestFlag_enumText = skinTestFlag == 1 ? '是' : '否';
existingRow.uniqueKey = preservedKey;
existingRow.isEdit = preservedIsEdit;
existingRow.statusEnum = preservedStatus;
existingRow.showPopover = false;
console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText);
// 🔧 Bug #455: 诊疗医嘱(adviceType=3)的执行科室默认使用患者就诊科室,
// 不使用positionId(诊疗目录配置的执行科室), 避免配置ID不在机构树中导致显示原始ID
@@ -4491,7 +4518,7 @@ function escKeyListener(e) {
index = prescriptionList.value.findIndex((item) => item.uniqueKey == expandOrder.value[0]);
}
if (index == 0) {
updateExpandOrder([] );
collapseAllExpanded( );
}
prescriptionList.value.shift();
isAdding.value = false;
@@ -4502,7 +4529,7 @@ function escKeyListener(e) {
// 签退/撤回
function handleSingOut() {
let selectRows = prescriptionRef.value.getSelectionRow s();
let selectRows = prescriptionRef.value.getCheckboxRecord s();
console.log('BugFix#219: handleSingOut called, selectRows=', selectRows);
console.log('BugFix#219: 选中行详情:', selectRows.map(item => ({
adviceType: item.adviceType,
@@ -4688,7 +4715,7 @@ function handleGroupId(paramList) {
// 组合
function combination() {
let selectRows = prescriptionRef.value.getSelectionRow s();
let selectRows = prescriptionRef.value.getCheckboxRecord s();
if (selectRows.length <= 1) {
proxy.$modal.msgWarning('至少选择两项');
return;
@@ -4750,7 +4777,7 @@ function combination() {
// 拆组
function split() {
let selectRows = prescriptionRef.value.getSelectionRow s();
let selectRows = prescriptionRef.value.getCheckboxRecord s();
if (selectRows.length < 1) {
proxy.$modal.msgWarning('至少选择一项');
return;
@@ -5344,8 +5371,8 @@ const orderSetDialogScope = ref('personal');
function openOrderSetDialog(scope) {
orderSetDialogScope.value = scope || 'personal';
const selectedRaw =
prescriptionRef.value && prescriptionRef.value.getSelectionRow s
? prescriptionRef.value.getSelectionRow s()
prescriptionRef.value && prescriptionRef.value.getCheckboxRecord s
? prescriptionRef.value.getCheckboxRecord s()
: [];
const selected = (selectedRaw || []).map((row) => {
@@ -5437,6 +5464,8 @@ defineExpose({ getListInfo, getDiagnosisInfo });
display : flex ;
align - items : center ;
gap : 8 px ;
flex - wrap : nowrap ;
white - space : nowrap ;
background : # fff ;
padding : 6 px 10 px ;
border - radius : 4 px ;
@@ -5444,6 +5473,18 @@ defineExpose({ getListInfo, getDiagnosisInfo });
box - shadow : 0 2 px 4 px rgba ( 0 , 0 , 0 , 0.04 ) ;
}
. edit - form - row {
display : flex ;
align - items : center ;
gap : 12 px ;
flex - wrap : nowrap ;
margin - top : 10 px ;
}
. edit - form - row . el - form - item {
margin - bottom : 0 ;
}
/* 调整element组件默认间距 */
// .el-select,
// .el-input-number {