Compare commits
7 Commits
赵云-bug508-
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ee09b22c7 | ||
|
|
6b4f897b9c | ||
|
|
848a55cf23 | ||
|
|
4ae4421827 | ||
|
|
4138dc39f6 | ||
|
|
718e7a90c5 | ||
|
|
68c682ad49 |
@@ -178,7 +178,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
inpatientAdviceParam.setEncounterIds(null);
|
inpatientAdviceParam.setEncounterIds(null);
|
||||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||||
inpatientAdviceParam.setExeStatus(null);
|
inpatientAdviceParam.setExeStatus(null);
|
||||||
// requestStatus由前端tab控制,后端SQL已通过CASE条件处理校对状态过滤,无需再作为SQL条件
|
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
|
||||||
inpatientAdviceParam.setRequestStatus(null);
|
inpatientAdviceParam.setRequestStatus(null);
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||||
@@ -198,7 +198,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
||||||
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
||||||
ChargeItemStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
|
ChargeItemStatus.REFUNDED.getValue(), EncounterClass.IMP.getValue(),
|
||||||
GenerateSource.DOCTOR_PRESCRIPTION.getValue());
|
GenerateSource.DOCTOR_PRESCRIPTION.getValue(), requestStatus);
|
||||||
inpatientAdvicePage.getRecords().forEach(e -> {
|
inpatientAdvicePage.getRecords().forEach(e -> {
|
||||||
// 是否皮试
|
// 是否皮试
|
||||||
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
e.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getSkinTestFlag()));
|
||||||
|
|||||||
@@ -69,5 +69,6 @@ public interface AdviceProcessAppMapper {
|
|||||||
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
|
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
|
||||||
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
|
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
|
||||||
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
||||||
@Param("doctorPrescription") Integer doctorPrescription);
|
@Param("doctorPrescription") Integer doctorPrescription,
|
||||||
|
@Param("requestStatus") Integer requestStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -290,6 +290,7 @@
|
|||||||
WHERE T1.delete_flag = '0'
|
WHERE T1.delete_flag = '0'
|
||||||
AND T1.refund_medicine_id IS NULL
|
AND T1.refund_medicine_id IS NULL
|
||||||
AND T1.generate_source_enum = #{doctorPrescription}
|
AND T1.generate_source_enum = #{doctorPrescription}
|
||||||
|
AND T1.status_enum = #{requestStatus}
|
||||||
AND CASE WHEN T1.status_enum = #{draft}
|
AND CASE WHEN T1.status_enum = #{draft}
|
||||||
THEN T1.performer_check_id IS NOT NULL
|
THEN T1.performer_check_id IS NOT NULL
|
||||||
ELSE 1=1 END
|
ELSE 1=1 END
|
||||||
@@ -422,6 +423,7 @@
|
|||||||
AND af.delete_flag = '0'
|
AND af.delete_flag = '0'
|
||||||
WHERE T1.delete_flag = '0'
|
WHERE T1.delete_flag = '0'
|
||||||
AND T1.generate_source_enum = #{doctorPrescription}
|
AND T1.generate_source_enum = #{doctorPrescription}
|
||||||
|
AND T1.status_enum = #{requestStatus}
|
||||||
AND CASE WHEN T1.status_enum = #{draft}
|
AND CASE WHEN T1.status_enum = #{draft}
|
||||||
THEN T1.performer_check_id IS NOT NULL
|
THEN T1.performer_check_id IS NOT NULL
|
||||||
ELSE 1=1 END
|
ELSE 1=1 END
|
||||||
|
|||||||
@@ -61,15 +61,14 @@
|
|||||||
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
|
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
|
||||||
drf.requester_id, drf.create_time, ap.name
|
drf.requester_id, drf.create_time, ap.name
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
HAVING CASE MIN(wsr.status_enum)
|
HAVING CASE
|
||||||
WHEN 1 THEN 0
|
WHEN MIN(wsr.status_enum) = 1 THEN 0
|
||||||
WHEN 2 THEN 1
|
WHEN MIN(wsr.status_enum) = 2 THEN 1
|
||||||
WHEN 3 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 AND MAX(CASE WHEN wsr.performer_check_id IS NOT NULL THEN 1 ELSE 0 END) = 1 THEN 2
|
||||||
WHEN 4 THEN 4
|
WHEN MIN(wsr.status_enum) = 3 THEN 4
|
||||||
WHEN 5 THEN 5
|
WHEN MIN(wsr.status_enum) = 4 THEN 3
|
||||||
WHEN 6 THEN 5
|
WHEN MIN(wsr.status_enum) = 5 OR MIN(wsr.status_enum) = 6 OR MIN(wsr.status_enum) = 7 THEN 7
|
||||||
WHEN 7 THEN 5
|
WHEN MIN(wsr.status_enum) = 8 THEN 6
|
||||||
WHEN 8 THEN 6
|
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END = #{status}::integer
|
END = #{status}::integer
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -1141,7 +1141,9 @@ function submitForm() {
|
|||||||
// 保存麻醉方式
|
// 保存麻醉方式
|
||||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||||
open.value = false
|
open.value = false
|
||||||
// 由父组件 @saved 事件负责刷新列表(带延迟确保后端事务已提交)
|
// 子组件自身主动刷新列表(立即),确保数据展示不依赖父组件事件
|
||||||
|
getList()
|
||||||
|
// 通知父组件刷新医嘱列表(父组件也会带延迟再次刷新手术列表作为兜底)
|
||||||
emit('saved')
|
emit('saved')
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
||||||
@@ -1158,6 +1160,8 @@ function submitForm() {
|
|||||||
// 保存麻醉方式
|
// 保存麻醉方式
|
||||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||||
open.value = false
|
open.value = false
|
||||||
|
// 子组件自身主动刷新列表(立即)
|
||||||
|
getList()
|
||||||
// 由父组件 @saved 事件负责刷新列表
|
// 由父组件 @saved 事件负责刷新列表
|
||||||
emit('saved')
|
emit('saved')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -93,7 +93,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间" width="160" />
|
<el-table-column prop="createTime" label="创建时间" width="160" />
|
||||||
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
|
<el-table-column prop="prescriptionNo" label="申请单号" width="140" />
|
||||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
|
||||||
<el-table-column label="申请单状态" width="120" align="center">
|
<el-table-column label="申请单状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="getStatusTagType(scope.row.status)" effect="plain" round>
|
<el-tag :type="getStatusTagType(scope.row.status)" effect="plain" round>
|
||||||
@@ -101,6 +100,7 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||||
<el-table-column label="操作" width="280" align="center" fixed="right">
|
<el-table-column label="操作" width="280" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 详情 - 所有状态都显示 -->
|
<!-- 详情 - 所有状态都显示 -->
|
||||||
|
|||||||
@@ -863,13 +863,22 @@ function clickRowDb(row, column, event) {
|
|||||||
}
|
}
|
||||||
row.showPopover = false;
|
row.showPopover = false;
|
||||||
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
||||||
if (row.statusEnum == 1) {
|
// 使用 Number() 做类型转换,确保后端返回的数值能正确比较
|
||||||
|
if (Number(row.statusEnum) === 1) {
|
||||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||||
row.isEdit = true;
|
row.isEdit = true;
|
||||||
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||||
prescriptionList.value[index] = row;
|
if (index !== -1) {
|
||||||
expandOrder.value = [row.uniqueKey];
|
prescriptionList.value.splice(index, 1, row);
|
||||||
|
// 使用 nextTick 确保数据更新后再设置展开状态,保证 el-table 能正确识别 row-key
|
||||||
|
nextTick(() => {
|
||||||
|
expandOrder.value = [row.uniqueKey];
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn('⚠️ clickRowDb 未找到匹配行: uniqueKey=', row.uniqueKey, ', row=', row);
|
||||||
|
proxy.$modal.msgWarning('无法进入编辑模式,请刷新列表后重试');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
|
<div class="fee-dialog-wrapper">
|
||||||
|
<el-dialog v-model="dialogVisible" title="补费" width="80%" :close-on-click-modal="false">
|
||||||
<div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
|
<div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
|
||||||
患者信息:{{
|
患者信息:{{
|
||||||
props.patientInfo.patientName +
|
props.patientInfo.patientName +
|
||||||
@@ -251,7 +252,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 划价组套选择对话框 -->
|
<!-- 划价组套选择对话框 -->
|
||||||
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000">
|
<el-dialog v-model="groupSetDialogVisible" title="划价组套选择" width="600px" :close-on-click-modal="false" append-to-body :z-index="3000" destroy-on-close>
|
||||||
<div style="margin-bottom: 15px; display: flex; align-items: center; gap: 10px">
|
<div style="margin-bottom: 15px; display: flex; align-items: center; gap: 10px">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="groupSetSearchText"
|
v-model="groupSetSearchText"
|
||||||
@@ -302,6 +303,7 @@
|
|||||||
<el-button type="primary" @click="applyGroupSet" :disabled="!selectedGroupSet">应用</el-button>
|
<el-button type="primary" @click="applyGroupSet" :disabled="!selectedGroupSet">应用</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -519,31 +521,28 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 加载科室选项(支持树形/扁平两种数据结构)
|
// 加载科室选项(递归扁平化树形结构)
|
||||||
function loadDepartmentOptions() {
|
function loadDepartmentOptions() {
|
||||||
getOrgList()
|
getOrgList()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data) {
|
if (!res?.data?.records?.length) {
|
||||||
// 尝试从树形结构中取:records[0].children
|
departmentOptions.value = [];
|
||||||
if (res.data.records && res.data.records.length > 0) {
|
return;
|
||||||
if (res.data.records[0].children && res.data.records[0].children.length > 0) {
|
|
||||||
departmentOptions.value = res.data.records[0].children;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 如果 records[0] 有 id 和 name(非树根节点),直接用所有 records
|
|
||||||
if (res.data.records[0].id) {
|
|
||||||
departmentOptions.value = res.data.records;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 兜底:如果 records 不存在或为空,尝试直接使用 data 本身
|
|
||||||
if (Array.isArray(res.data)) {
|
|
||||||
departmentOptions.value = res.data;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 所有方式都失败,置空
|
// 递归扁平化树形结构,提取所有科室节点
|
||||||
departmentOptions.value = [];
|
const flattenTree = (nodes) => {
|
||||||
|
const result = [];
|
||||||
|
for (const node of nodes) {
|
||||||
|
if (node?.id && node?.name) {
|
||||||
|
result.push(node);
|
||||||
|
}
|
||||||
|
if (node?.children?.length) {
|
||||||
|
result.push(...flattenTree(node.children));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
departmentOptions.value = flattenTree(res.data.records);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.warn('科室列表加载失败(可能无权限)');
|
console.warn('科室列表加载失败(可能无权限)');
|
||||||
@@ -609,13 +608,13 @@ function getUnitCodeOptions(row) {
|
|||||||
const unitCodes = [];
|
const unitCodes = [];
|
||||||
// 大单位:优先用 code,code 缺失时用字典文本兜底
|
// 大单位:优先用 code,code 缺失时用字典文本兜底
|
||||||
if (row.unitCode != null && String(row.unitCode) !== '') {
|
if (row.unitCode != null && String(row.unitCode) !== '') {
|
||||||
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText });
|
unitCodes.push({ code: String(row.unitCode), codeText: row.unitCode_dictText || String(row.unitCode) });
|
||||||
} else if (row.unitCode_dictText) {
|
} else if (row.unitCode_dictText) {
|
||||||
unitCodes.push({ code: row.unitCode_dictText, codeText: row.unitCode_dictText });
|
unitCodes.push({ code: row.unitCode_dictText, codeText: row.unitCode_dictText });
|
||||||
}
|
}
|
||||||
// 小单位:同上
|
// 小单位:同上
|
||||||
if (row.minUnitCode != null && String(row.minUnitCode) !== '') {
|
if (row.minUnitCode != null && String(row.minUnitCode) !== '') {
|
||||||
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText });
|
unitCodes.push({ code: String(row.minUnitCode), codeText: row.minUnitCode_dictText || String(row.minUnitCode) });
|
||||||
} else if (row.minUnitCode_dictText) {
|
} else if (row.minUnitCode_dictText) {
|
||||||
unitCodes.push({ code: row.minUnitCode_dictText, codeText: row.minUnitCode_dictText });
|
unitCodes.push({ code: row.minUnitCode_dictText, codeText: row.minUnitCode_dictText });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user