Fix Bug 505505 【业务逻辑缺陷】药品医嘱已由药房发药,护士仍能在“医嘱校对”模块执行“退回”操作
[门诊手术安排]“手术申请查询”弹窗底部,分页组件与界底部元素重叠,影响操作。
This commit is contained in:
@@ -178,9 +178,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
inpatientAdviceParam.setEncounterIds(null);
|
||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||
inpatientAdviceParam.setExeStatus(null);
|
||||
// requestStatus由前端tab控制,需在后端过滤
|
||||
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
|
||||
inpatientAdviceParam.setRequestStatus(null);
|
||||
// requestStatus由前端tab传入,通过QueryWrapper自动添加到SQL外层WHERE过滤
|
||||
// 构建查询条件
|
||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
||||
@@ -293,16 +291,6 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
inpatientAdvicePage.setTotal(filteredList.size());
|
||||
}
|
||||
}
|
||||
|
||||
// 按请求状态(tab切换)过滤医嘱
|
||||
if (requestStatus != null) {
|
||||
List<InpatientAdviceDto> statusFilteredList = inpatientAdvicePage.getRecords().stream()
|
||||
.filter(advice -> requestStatus.equals(advice.getRequestStatus()))
|
||||
.collect(Collectors.toList());
|
||||
inpatientAdvicePage.setRecords(statusFilteredList);
|
||||
inpatientAdvicePage.setTotal(statusFilteredList.size());
|
||||
}
|
||||
|
||||
return R.ok(inpatientAdvicePage);
|
||||
}
|
||||
|
||||
@@ -379,7 +367,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
.in(MedicationDispense::getMedReqId, medReqIds)
|
||||
.eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue()));
|
||||
if (!dispenseList.isEmpty()) {
|
||||
return R.fail("该医嘱已发药,无法退回");
|
||||
return R.fail("该药品已由药房发放,请先执行退药处理,不可直接退回");
|
||||
}
|
||||
}
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<span class="descriptions-item-label">全选:</span>
|
||||
<el-switch v-model="chooseAll" @change="handelSwitchChange" />
|
||||
<el-button class="ml20" type="primary" @click="handleCheck"> 核对通过 </el-button>
|
||||
<el-button class="ml20 mr20" type="danger" @click="handleCancel"> 退回 </el-button>
|
||||
<el-button class="ml20 mr20" type="danger" :disabled="hasDispensedSelected" @click="handleCancel"> 退回 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -152,6 +152,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, computed} from 'vue';
|
||||
import {adviceVerify, cancel, getPrescriptionList} from './api';
|
||||
import {patientInfoList} from '../../components/store/patient.js';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
@@ -163,6 +164,11 @@ const type = ref(null);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(false);
|
||||
const chooseAll = ref(false);
|
||||
const selectionTrigger = ref(0);
|
||||
const hasDispensedSelected = computed(() => {
|
||||
selectionTrigger.value;
|
||||
return getSelectRows().some(item => item.dispenseStatus === 4);
|
||||
});
|
||||
const props = defineProps({
|
||||
requestStatus: {
|
||||
type: Number,
|
||||
@@ -262,7 +268,9 @@ function getGroupMarkers() {
|
||||
}
|
||||
|
||||
// 选择框改变时的处理
|
||||
function handleSelectionChange(selection, row) {}
|
||||
function handleSelectionChange(selection, row) {
|
||||
selectionTrigger.value++;
|
||||
}
|
||||
|
||||
/**
|
||||
* 核对通过
|
||||
@@ -291,7 +299,7 @@ function handleCancel() {
|
||||
// 校验已发药的医嘱不允许退回
|
||||
let dispensedItems = list.filter(item => item.dispenseStatus === 4);
|
||||
if (dispensedItems.length > 0) {
|
||||
proxy.$message.error('该医嘱已发药,无法退回');
|
||||
proxy.$message.error('该药品已由药房发放,请先执行退药处理,不可直接退回');
|
||||
return;
|
||||
}
|
||||
cancel(list).then((res) => {
|
||||
@@ -310,12 +318,16 @@ function getSelectRows() {
|
||||
// 获取选中的医嘱信息
|
||||
let list = [];
|
||||
prescriptionList.value.forEach((item, index) => {
|
||||
list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
|
||||
const ref = proxy.$refs['tableRef' + index];
|
||||
if (ref && ref[0]) {
|
||||
list = [...list, ...ref[0].getSelectionRows()];
|
||||
}
|
||||
});
|
||||
return list.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
requestTable: item.adviceTable,
|
||||
dispenseStatus: item.dispenseStatus,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 手术申请查询弹窗 -->
|
||||
<el-dialog :title="'手术申请查询'" v-model="showApplyDialog" width="1200px" @close="cancelApplyDialog" class="apply-query-dialog">
|
||||
<el-dialog :title="'手术申请查询'" v-model="showApplyDialog" width="1200px" @close="cancelApplyDialog" class="surgery-apply-dialog">
|
||||
<!-- 查询条件区 -->
|
||||
<el-form :model="applyQueryParams" ref="applyQueryRef" :inline="true" class="query-form">
|
||||
<el-form-item label="手术单号" prop="surgeryNo">
|
||||
@@ -741,16 +741,16 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 结果表格区 -->
|
||||
<el-table
|
||||
ref="applyTableRef"
|
||||
v-loading="applyLoading"
|
||||
:data="applyList"
|
||||
row-key="surgeryNo"
|
||||
@row-click="handleApplyRowClick"
|
||||
:row-class-name="tableRowClassName"
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
:scroll="{ y: 400 }"
|
||||
<el-table
|
||||
ref="applyTableRef"
|
||||
v-loading="applyLoading"
|
||||
:data="applyList"
|
||||
row-key="surgeryNo"
|
||||
@row-click="handleApplyRowClick"
|
||||
:row-class-name="tableRowClassName"
|
||||
style="width: 100%"
|
||||
max-height="340"
|
||||
:scroll="{ y: 340 }"
|
||||
>
|
||||
<el-table-column type="selection" width="55" :selectable="handleSelectable" />
|
||||
<el-table-column label="ID" align="center" width="80" fixed>
|
||||
@@ -781,7 +781,7 @@
|
||||
</el-table>
|
||||
|
||||
<!-- 底部分页区 -->
|
||||
<div class="pagination-container">
|
||||
<div class="pagination-container apply-pagination" style="margin-top: 10px; padding-bottom: 20px">
|
||||
<pagination
|
||||
v-show="applyTotal > 0"
|
||||
:total="applyTotal"
|
||||
@@ -792,10 +792,12 @@
|
||||
@pagination="getSurgicalScheduleList"
|
||||
/>
|
||||
</div>
|
||||
<!-- 分页与底部操作区之间的间隔 -->
|
||||
<div style="height: 48px"></div>
|
||||
|
||||
<!-- 底部操作区 -->
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<div class="dialog-footer" style="margin-top: 24px; padding-top: 12px; border-top: 1px solid #ebeef5">
|
||||
<el-button @click="cancelApplyDialog">取消</el-button>
|
||||
<el-button type="primary" @click="confirmApply">确认</el-button>
|
||||
</div>
|
||||
@@ -830,8 +832,8 @@
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
<prescriptionlist :patientInfo="chargePatientInfo" ref="prescriptionRef"
|
||||
:sourceBillNo="chargePatientInfo.sourceBillNo"
|
||||
:generateSourceEnum="chargePatientInfo.generateSourceEnum" />
|
||||
:generateSourceEnum="1"
|
||||
:sourceBillNo="chargePatientInfo.sourceBillNo" />
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2350,6 +2352,22 @@ function getRowClassName({ row, rowIndex }) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* 手术申请查询弹窗 — 分页与footer间距 */
|
||||
.surgery-apply-dialog :deep(.el-dialog__body) {
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
.surgery-apply-dialog :deep(.el-dialog__footer) {
|
||||
padding-top: 0;
|
||||
}
|
||||
.surgery-apply-dialog :deep(.apply-pagination) {
|
||||
padding-bottom: 24px;
|
||||
margin-bottom: 16px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
.surgery-apply-dialog :deep(.apply-pagination .el-pagination) {
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
/* 选中行样式 */
|
||||
:deep(.el-table .selected-row) {
|
||||
background-color: #ecf5ff !important;
|
||||
@@ -2359,21 +2377,22 @@ function getRowClassName({ row, rowIndex }) {
|
||||
border-bottom: 1px solid #d9ecff !important;
|
||||
}
|
||||
|
||||
/* 手术申请查询弹窗 — 防止分页与底部重叠 */
|
||||
:deep(.apply-query-dialog .el-dialog__body) {
|
||||
max-height: 75vh;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
:deep(.apply-query-dialog .pagination-container) {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
:deep(.apply-query-dialog .dialog-footer) {
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 手术申请查询弹窗 — 非 scoped 确保穿透 teleport */
|
||||
.surgery-apply-dialog .apply-pagination {
|
||||
padding-bottom: 24px !important;
|
||||
margin-bottom: 16px !important;
|
||||
border-bottom: 1px solid #ebeef5 !important;
|
||||
}
|
||||
.surgery-apply-dialog .apply-pagination .el-pagination {
|
||||
margin-right: 80px !important;
|
||||
}
|
||||
.surgery-apply-dialog .el-dialog__body {
|
||||
padding-bottom: 32px !important;
|
||||
}
|
||||
.surgery-apply-dialog .el-dialog__footer {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user