Fix Bug #497: 【住院医生工作站-检查申请】检查申请列表缺失"申请单状态"列及全流程闭环状态流转逻辑
1. 修复 examineApplication.vue 模板结构损坏问题(</template>提前闭合导致大量HTML游离在模板外) 2. 申请单状态列改为使用 formatter 显示中文(待签发→已签发→已校对→待接收→已接收→已检查→已出报告→已作废) 3. 新增筛选功能:申请日期范围筛选 + 申请单状态下拉筛选 4. 修复 index.vue 模板中检查申请 tab-pane 缺失(被 markdown fence 替换)及手术申请 tab 结构损坏 5. 后端 RequestFormQueryDto 新增 status 字段,SQL 查询补充 drf.status 返回 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-05 21:16:06
|
||||
* @Description: 检查申请详情
|
||||
* @Description: 检查申请
|
||||
-->
|
||||
<template>
|
||||
<div class="report-container">
|
||||
@@ -16,6 +16,51 @@
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
</div>
|
||||
<!-- 筛选表单 -->
|
||||
<div class="filter-form">
|
||||
<el-form :inline="true" :model="filterForm" class="filter-form-content">
|
||||
<el-form-item label="申请日期">
|
||||
<el-date-picker
|
||||
v-model="filterForm.dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请单状态">
|
||||
<el-select
|
||||
v-model="filterForm.status"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="待签发" value="0" />
|
||||
<el-option label="已签发" value="1" />
|
||||
<el-option label="已校对" value="2" />
|
||||
<el-option label="待接收" value="3" />
|
||||
<el-option label="已接收" value="4" />
|
||||
<el-option label="已检查" value="5" />
|
||||
<el-option label="已出报告" value="6" />
|
||||
<el-option label="已作废" value="7" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleSearch" :loading="loading">
|
||||
<el-icon><Search /></el-icon>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button @click="handleReset">
|
||||
<el-icon><Refresh /></el-icon>
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="report-table-wrapper">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@@ -25,13 +70,22 @@
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #empty>
|
||||
<div class="empty-data">
|
||||
<el-empty description="暂无匹配记录" :image-size="80" />
|
||||
</div>
|
||||
</template>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="120" />
|
||||
<el-table-column prop="name" label="申请单名称" width="140" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="140" />
|
||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||
<el-table-column prop="status" label="申请单状态" width="120" />
|
||||
<el-table-column label="申请单状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ parseStatus(scope.row.status) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||
@@ -59,14 +113,8 @@
|
||||
currentDetail.name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单状态">{{
|
||||
currentDetail.status || '-'
|
||||
parseStatus(currentDetail.status)
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{
|
||||
currentDetail.createTime || '-'
|
||||
}}</el-descriptions-item>
|
||||
@@ -117,7 +165,7 @@
|
||||
|
||||
<script setup>
|
||||
import {computed, getCurrentInstance, ref, watch} from 'vue';
|
||||
import {Refresh} from '@element-plus/icons-vue';
|
||||
import {Refresh, Search} from '@element-plus/icons-vue';
|
||||
import {patientInfo} from '../../store/patient.js';
|
||||
import {getCheck} from './api';
|
||||
import {getOrgList} from '@/views/doctorstation/components/api.js';
|
||||
@@ -131,6 +179,12 @@ const currentDetail = ref(null);
|
||||
const descJsonData = ref(null);
|
||||
const orgOptions = ref([]);
|
||||
|
||||
// 筛选表单数据
|
||||
const filterForm = ref({
|
||||
dateRange: [], // [startDate, endDate]
|
||||
status: '', // 申请单状态
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
tableData.value = [];
|
||||
@@ -139,7 +193,21 @@ const fetchData = async () => {
|
||||
}
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getCheck({ encounterId: patientInfo.value.encounterId });
|
||||
// 构建查询参数
|
||||
const params = { encounterId: patientInfo.value.encounterId };
|
||||
|
||||
// 添加日期范围筛选
|
||||
if (filterForm.value.dateRange && filterForm.value.dateRange.length === 2) {
|
||||
params.startDate = filterForm.value.dateRange[0];
|
||||
params.endDate = filterForm.value.dateRange[1];
|
||||
}
|
||||
|
||||
// 添加状态筛选
|
||||
if (filterForm.value.status !== '' && filterForm.value.status !== undefined) {
|
||||
params.status = filterForm.value.status;
|
||||
}
|
||||
|
||||
const res = await getCheck(params);
|
||||
if (res.code === 200 && res.data) {
|
||||
const raw = res.data?.records || res.data;
|
||||
const list = Array.isArray(raw) ? raw : [raw];
|
||||
@@ -148,7 +216,7 @@ const fetchData = async () => {
|
||||
tableData.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
proxy.$modal?.msgError?.(e.message || '查询检查申请失败');
|
||||
console.warn('查询检查申请失败:', e.message);
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false;
|
||||
@@ -160,6 +228,45 @@ const handleRefresh = async () => {
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询按钮处理
|
||||
*/
|
||||
const handleSearch = async () => {
|
||||
if (!patientInfo.value?.encounterId) {
|
||||
proxy.$modal?.msgWarning?.('请先选择患者');
|
||||
return;
|
||||
}
|
||||
await fetchData();
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置按钮处理
|
||||
*/
|
||||
const handleReset = () => {
|
||||
filterForm.value.dateRange = [];
|
||||
filterForm.value.status = '';
|
||||
fetchData();
|
||||
};
|
||||
|
||||
/**
|
||||
* 解析申请单状态
|
||||
* @param {string|number} status - 状态码
|
||||
* @returns {string} 状态文本
|
||||
*/
|
||||
const parseStatus = (status) => {
|
||||
const statusMap = {
|
||||
'0': '待签发',
|
||||
'1': '已签发',
|
||||
'2': '已校对',
|
||||
'3': '待接收',
|
||||
'4': '已接收',
|
||||
'5': '已检查',
|
||||
'6': '已出报告',
|
||||
'7': '已作废',
|
||||
};
|
||||
return statusMap[String(status)] || '-';
|
||||
};
|
||||
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
@@ -237,6 +344,8 @@ watch(
|
||||
getLocationInfo();
|
||||
} else {
|
||||
tableData.value = [];
|
||||
filterForm.value.dateRange = [];
|
||||
filterForm.value.status = '';
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -273,6 +382,23 @@ defineExpose({
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.filter-form {
|
||||
padding: 12px 8px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.filter-form-content {
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.report-table-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -280,6 +406,13 @@ defineExpose({
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.empty-data {
|
||||
padding: 40px 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.report-refresh-icon {
|
||||
cursor: pointer;
|
||||
color: #909399;
|
||||
@@ -322,7 +455,7 @@ defineExpose({
|
||||
|
||||
.applicationShow-container-table {
|
||||
flex-shrink: 0;
|
||||
max-height: 300px;
|
||||
max-height: 3000px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user