开立医嘱的执行科室默认获取诊疗项目维护的所属科室
This commit is contained in:
@@ -550,51 +550,36 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="序号" align="center" width="60" prop="sortNumber"> </el-table-column> -->
|
||||
<el-table-column label="医嘱" align="center" prop="productName" width="400">
|
||||
<!-- 医嘱类型列 -->
|
||||
<el-table-column label="医嘱类型" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<template v-if="getRowDisabled(scope.row)">
|
||||
<el-select
|
||||
style="width: 35%; margin-right: 20px"
|
||||
v-model="scope.row.adviceType"
|
||||
:ref="'adviceTypeRef' + scope.$index"
|
||||
@change="
|
||||
(value) => {
|
||||
expandOrder = [];
|
||||
prescriptionList[scope.$index].adviceName = undefined;
|
||||
|
||||
// 直接更新查询参数
|
||||
adviceQueryParams.value.adviceType = value;
|
||||
adviceQueryParams.value.searchKey = '';
|
||||
|
||||
console.log('医嘱类型改变为:', value, '查询参数:', adviceQueryParams.value);
|
||||
|
||||
// 确保弹窗重新打开
|
||||
nextTick(() => {
|
||||
row.showPopover = true;
|
||||
handleFocus(scope.row, scope.$index);
|
||||
});
|
||||
}
|
||||
"
|
||||
>
|
||||
@change="handleAdviceTypeChange(scope.row, scope.$index)"
|
||||
placeholder="请选择"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in adviceTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@click="
|
||||
() => {
|
||||
prescriptionList[scope.$index].adviceType = item.value;
|
||||
prescriptionList[scope.$index].adviceType_dictText = item.label;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<span v-else>{{ getAdviceTypeText(scope.row.adviceType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 项目列 -->
|
||||
<el-table-column label="项目" align="center" prop="productName" width="280">
|
||||
<template #default="scope">
|
||||
<template v-if="getRowDisabled(scope.row)">
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
:visible="scope.row.showPopover"
|
||||
:width="1200"
|
||||
>
|
||||
:width="1200">
|
||||
<adviceBaseList
|
||||
ref="adviceTableRef"
|
||||
:popoverVisible="scope.row.showPopover"
|
||||
@@ -605,24 +590,14 @@
|
||||
<template #reference>
|
||||
<el-input
|
||||
:ref="'adviceRef' + scope.$index"
|
||||
style="width: 50%"
|
||||
v-model="scope.row.adviceName"
|
||||
placeholder="请选择项目"
|
||||
@input="handleChange"
|
||||
@click="handleFocus(scope.row, scope.$index)"
|
||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
||||
@keydown="
|
||||
(e) => {
|
||||
if (!scope.row.showPopover) return;
|
||||
// 拦截上下键和回车事件
|
||||
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
|
||||
e.preventDefault();
|
||||
// 传递事件到弹窗容器
|
||||
adviceTableRef.handleKeyDown(e);
|
||||
}
|
||||
}
|
||||
"
|
||||
@keydown="handleInputKeyDown(scope.row, $event)"
|
||||
@blur="handleBlur(scope.row)"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
@@ -877,6 +852,15 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
// 获取医嘱类别显示文本
|
||||
function getAdviceTypeText(adviceType) {
|
||||
const typeMap = {
|
||||
1: '西药中成药',
|
||||
2: '耗材',
|
||||
3: '诊疗'
|
||||
};
|
||||
return typeMap[adviceType] || '未知';
|
||||
}
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = prescriptionList.value.reduce((accumulator, currentRow) => {
|
||||
if (currentRow.chargeStatus != 8) {
|
||||
@@ -1119,7 +1103,9 @@ function selectAdviceBase(key, row) {
|
||||
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
||||
}
|
||||
} else {
|
||||
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
|
||||
// 执行科室默认逻辑:优先使用诊疗项目维护的所属科室,如果没有则使用开单科室
|
||||
const defaultOrgId = row.positionId || props.patientInfo.orgId;
|
||||
prescriptionList.value[rowIndex.value].orgId = defaultOrgId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
|
||||
}
|
||||
expandOrder.value = [key];
|
||||
@@ -1515,7 +1501,9 @@ function setValue(row) {
|
||||
.toFixed(2);
|
||||
}
|
||||
} else {
|
||||
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
|
||||
// 执行科室默认逻辑:优先使用诊疗项目维护的所属科室,如果没有则使用开单科室
|
||||
const defaultOrgId = row.positionId || props.patientInfo.orgId;
|
||||
prescriptionList.value[rowIndex.value].orgId = defaultOrgId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user