Compare commits
3 Commits
e770741c8b
...
2e00caf336
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e00caf336 | ||
|
|
31fec4fbe6 | ||
|
|
cd038fc793 |
@@ -413,29 +413,33 @@
|
|||||||
:key="idx"
|
:key="idx"
|
||||||
class="selected-item-card"
|
class="selected-item-card"
|
||||||
>
|
>
|
||||||
<!-- Bug #384修复: 项目卡片头部,可展开/收起 -->
|
<!-- Bug #384修复 + #426修复: 项目卡片头部,可展开/收起 -->
|
||||||
<div class="card-header" @click="toggleItemExpand(item)">
|
<div class="card-header" @click="toggleItemExpand(item)">
|
||||||
|
<el-tag v-if="item.isPackage || item.packageName" size="small" type="warning" style="margin-right: 4px; flex-shrink: 0;">套餐</el-tag>
|
||||||
<span class="card-name">{{ item.name }}</span>
|
<span class="card-name">{{ item.name }}</span>
|
||||||
<span class="card-price">¥{{ item.price }}</span>
|
<span class="card-price">¥{{ item.price }}</span>
|
||||||
<!-- 展开图标 -->
|
<!-- 展开/收起图标 -->
|
||||||
<el-icon :class="['expand-icon', { expanded: item.expanded }]">
|
<el-icon class="expand-icon" :class="{ expanded: item.expanded }">
|
||||||
<ArrowDown v-if="!item.expanded" />
|
<ArrowRight />
|
||||||
<ArrowUp v-if="item.expanded" />
|
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<!-- 删除按钮 -->
|
<!-- 删除按钮 -->
|
||||||
<el-button link type="danger" size="small" @click.stop="handleRemoveItem(idx, item)">
|
<el-button link type="danger" size="small" @click.stop="handleRemoveItem(idx, item)">
|
||||||
<el-icon><Close /></el-icon>
|
<el-icon><Close /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- Bug #428修复: 展开后显示套餐明细或检查方法 -->
|
<!-- Bug #428修复 + #426修复: 展开后显示套餐明细或检查方法 -->
|
||||||
<div v-if="item.expanded">
|
<div v-show="item.expanded" class="expanded-content">
|
||||||
<!-- 显示套餐明细 -->
|
<!-- 显示套餐明细 -->
|
||||||
<div v-if="item.packageDetails && item.packageDetails.length > 0" class="package-details-list">
|
<div v-if="(item.isPackage || item.packageName) && item.packageDetails && item.packageDetails.length > 0" class="package-details-list">
|
||||||
<div class="detail-row" v-for="detail in item.packageDetails" :key="detail.id">
|
<div class="detail-row" v-for="detail in item.packageDetails" :key="detail.id">
|
||||||
<span class="detail-name">{{ detail.name }}</span>
|
<span class="detail-name">{{ detail.name }}</span>
|
||||||
<span class="detail-info">数量: {{ detail.quantity }} 单价: ¥{{ detail.price }}</span>
|
<span class="detail-info">数量: {{ detail.quantity }} 单价: ¥{{ detail.price }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 套餐明细加载中 -->
|
||||||
|
<div v-else-if="(item.isPackage || item.packageName) && item.packageDetailsLoading" class="package-loading-hint">
|
||||||
|
加载中...
|
||||||
|
</div>
|
||||||
<!-- 显示检查方法 -->
|
<!-- 显示检查方法 -->
|
||||||
<div v-else-if="item.methods && item.methods.length > 0" class="method-list">
|
<div v-else-if="item.methods && item.methods.length > 0" class="method-list">
|
||||||
<div v-for="method in item.methods" :key="method.id" class="method-option">
|
<div v-for="method in item.methods" :key="method.id" class="method-option">
|
||||||
@@ -473,7 +477,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, computed, watch, onMounted, nextTick } from 'vue';
|
import { ref, reactive, computed, watch, onMounted, nextTick } from 'vue';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { Printer, Delete, ArrowDown, ArrowUp, Close } from '@element-plus/icons-vue';
|
import { Printer, Delete, ArrowDown, ArrowUp, Close, ArrowRight } from '@element-plus/icons-vue';
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import { listCheckMethod, searchCheckMethod, listCheckPackage } from '@/api/system/checkType';
|
import { listCheckMethod, searchCheckMethod, listCheckPackage } from '@/api/system/checkType';
|
||||||
@@ -592,11 +596,13 @@ async function loadPackageDetails(row, treeNode, resolve) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// #428修复: 为已选择项目加载套餐明细(通过packageId或packageName查询)
|
// #428修复 + #426修复: 为已选择项目加载套餐明细(通过packageId或packageName查询)
|
||||||
async function loadPackageDetailsForItem(item) {
|
async function loadPackageDetailsForItem(item) {
|
||||||
if (!item.isPackage || (!item.packageId && !item.packageName)) {
|
// 只要有 packageName 就认为是套餐,不强制要求 isPackage 或 packageId
|
||||||
|
if (!item.packageName && !item.packageId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
item.packageDetailsLoading = true;
|
||||||
try {
|
try {
|
||||||
let packageId = item.packageId;
|
let packageId = item.packageId;
|
||||||
if (!packageId && item.packageName) {
|
if (!packageId && item.packageName) {
|
||||||
@@ -612,6 +618,10 @@ async function loadPackageDetailsForItem(item) {
|
|||||||
}
|
}
|
||||||
packageId = packages[0].id;
|
packageId = packages[0].id;
|
||||||
}
|
}
|
||||||
|
if (!packageId) {
|
||||||
|
item.packageDetails = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
const res = await request({
|
const res = await request({
|
||||||
url: `/system/package/${packageId}/details`,
|
url: `/system/package/${packageId}/details`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@@ -630,6 +640,8 @@ async function loadPackageDetailsForItem(item) {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('加载套餐明细失败:', err);
|
console.error('加载套餐明细失败:', err);
|
||||||
item.packageDetails = [];
|
item.packageDetails = [];
|
||||||
|
} finally {
|
||||||
|
item.packageDetailsLoading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const detailTableRef = ref(null);
|
const detailTableRef = ref(null);
|
||||||
@@ -1396,11 +1408,11 @@ async function handleItemSelect(checked, item, cat) {
|
|||||||
// Bug #382 修复:移除自动切换页签逻辑,保持当前页签状态
|
// Bug #382 修复:移除自动切换页签逻辑,保持当前页签状态
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug #384修复: 展开/收起项目卡片
|
// Bug #384修复 + #426修复: 展开/收起项目卡片
|
||||||
async function toggleItemExpand(item) {
|
async function toggleItemExpand(item) {
|
||||||
item.expanded = !item.expanded;
|
item.expanded = !item.expanded;
|
||||||
// 如果是展开且该项目是套餐,加载套餐明细
|
// 如果是展开且该项目是套餐(通过 isPackage 或 packageName 判断),加载套餐明细
|
||||||
if (item.expanded && item.isPackage && (!item.packageDetails || item.packageDetails.length === 0)) {
|
if (item.expanded && (item.isPackage || item.packageName) && (!item.packageDetails || item.packageDetails.length === 0) && !item.packageDetailsLoading) {
|
||||||
await loadPackageDetailsForItem(item);
|
await loadPackageDetailsForItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1812,10 +1824,24 @@ defineExpose({ getList });
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
transition: transform 0.2s;
|
transition: transform 0.2s;
|
||||||
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.expand-icon.expanded {
|
.expand-icon.expanded {
|
||||||
transform: rotate(180deg);
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bug #426修复: 展开内容容器 */
|
||||||
|
.expanded-content {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bug #426修复: 套餐明细加载提示 */
|
||||||
|
.package-loading-hint {
|
||||||
|
padding: 8px 10px;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bug #428修复: 套餐明细列表样式 */
|
/* Bug #428修复: 套餐明细列表样式 */
|
||||||
|
|||||||
@@ -3418,7 +3418,12 @@ async function setValue(row) {
|
|||||||
console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText);
|
console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText);
|
||||||
// 🔧 Bug #455: 诊疗医嘱(adviceType=3)的执行科室默认使用患者就诊科室,
|
// 🔧 Bug #455: 诊疗医嘱(adviceType=3)的执行科室默认使用患者就诊科室,
|
||||||
// 不使用positionId(诊疗目录配置的执行科室),避免配置ID不在机构树中导致显示原始ID
|
// 不使用positionId(诊疗目录配置的执行科室),避免配置ID不在机构树中导致显示原始ID
|
||||||
if (Number(row.adviceType) != 3) {
|
if (Number(row.adviceType) == 3) {
|
||||||
|
// 覆盖 catalog 传来的 positionId/orgId,使用患者就诊科室
|
||||||
|
prescriptionList.value[rowIndex.value].orgId = props.patientInfo?.orgId;
|
||||||
|
prescriptionList.value[rowIndex.value].positionId = props.patientInfo?.orgId;
|
||||||
|
prescriptionList.value[rowIndex.value].positionName = findOrgNameById(props.patientInfo?.orgId) || props.patientInfo?.orgName || '';
|
||||||
|
} else {
|
||||||
prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId;
|
prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId;
|
||||||
}
|
}
|
||||||
prescriptionList.value[rowIndex.value].dose = row.dose || row.doseQuantity;
|
prescriptionList.value[rowIndex.value].dose = row.dose || row.doseQuantity;
|
||||||
@@ -3652,7 +3657,10 @@ function handleSaveGroup(orderGroupList) {
|
|||||||
unitCode_dictText: item.unitCodeName || '',
|
unitCode_dictText: item.unitCodeName || '',
|
||||||
statusEnum: 1,
|
statusEnum: 1,
|
||||||
// 🔧 修复执行科室逻辑:优先使用 orgId(所属科室),其次 positionId
|
// 🔧 修复执行科室逻辑:优先使用 orgId(所属科室),其次 positionId
|
||||||
orgId: item.orderDetailInfos?.orgId || mergedDetail.orgId || item.positionId || item.orderDetailInfos?.positionId || mergedDetail.positionId,
|
// 🔧 Bug #455: 诊疗类(adviceType=3)使用患者就诊科室,不使用目录配置的ID
|
||||||
|
orgId: item.adviceType === 3
|
||||||
|
? props.patientInfo?.orgId
|
||||||
|
: (item.orderDetailInfos?.orgId || mergedDetail.orgId || item.positionId || item.orderDetailInfos?.positionId || mergedDetail.positionId),
|
||||||
dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1',
|
dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1',
|
||||||
conditionId: conditionId.value,
|
conditionId: conditionId.value,
|
||||||
conditionDefinitionId: conditionDefinitionId.value,
|
conditionDefinitionId: conditionDefinitionId.value,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="surgeryList" row-key="id" :row-class-name="getRowClassName">
|
<el-table v-loading="loading" :data="surgeryList" row-key="id" :row-class-name="getRowClassName" highlight-current-row @current-change="handleCurrentChange">
|
||||||
<!-- 申请日期:datetime - 2025-09-19 14:15:00 - 不可操作 -->
|
<!-- 申请日期:datetime - 2025-09-19 14:15:00 - 不可操作 -->
|
||||||
<el-table-column label="申请日期" align="center" prop="createTime" width="160">
|
<el-table-column label="申请日期" align="center" prop="createTime" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -1405,6 +1405,12 @@ function getRowClassName({ row }) {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 当前选中行(高亮)
|
||||||
|
const currentRow = ref(null)
|
||||||
|
function handleCurrentChange(row) {
|
||||||
|
currentRow.value = row
|
||||||
|
}
|
||||||
|
|
||||||
// 时间格式化函数
|
// 时间格式化函数
|
||||||
function parseTime(time, pattern) {
|
function parseTime(time, pattern) {
|
||||||
if (!time) return ''
|
if (!time) return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user