Compare commits
6 Commits
9db73db031
...
3103c619f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3103c619f2 | ||
|
|
f9ab4c5688 | ||
|
|
861129c9d4 | ||
|
|
78a2dfa3fe | ||
|
|
98e5a0b984 | ||
| e5c944069b |
@@ -147,8 +147,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
||||
for (OrganizationLocation organizationLocation : organizationLocationList)
|
||||
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||
Organization org = organizationService.getById(organizationLocation.getOrganizationId());
|
||||
String organizationName = org != null ? org.getName() : "未知科室";
|
||||
String organizationName =
|
||||
organizationService.getById(organizationLocation.getOrganizationId()).getName();
|
||||
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||
}
|
||||
|
||||
@@ -523,7 +523,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
// 处理长期已发放的药品
|
||||
if (!longMedDispensedList.isEmpty()) {
|
||||
// 生成退药单
|
||||
this.creatRefundMedicationList(longMedDispensedList, procedureIdMap);
|
||||
this.creatRefundMedicationList(tempMedDispensedList, procedureIdMap);
|
||||
}
|
||||
// 处理临时已发放药品
|
||||
if (!tempMedDispensedList.isEmpty()) {
|
||||
@@ -653,7 +653,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
if (!longMedUndispenseList.isEmpty()) {
|
||||
// 排除已汇总的药品
|
||||
List<MedicationDispense> medicationDispenseList
|
||||
= longMedUndispenseList.stream().filter(x -> x.getSummaryNo() == null).toList();
|
||||
= tempMedUndispenseList.stream().filter(x -> x.getSummaryNo() == null).toList();
|
||||
medicationDispenseService
|
||||
.removeByIds(medicationDispenseList.stream().map(MedicationDispense::getId).toList());
|
||||
}
|
||||
|
||||
@@ -132,10 +132,6 @@ function onCancel() {
|
||||
|
||||
// 批量添加
|
||||
async function onConfirm() {
|
||||
if (!props.organizationId) {
|
||||
proxy.$message.error('请先在左侧选择科室');
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.value.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
||||
@@ -366,10 +366,6 @@ function handleBlur(row, index) {
|
||||
|
||||
// 编辑或 保存当前行
|
||||
function openSaveImplementDepartment(row) {
|
||||
if (!organizationId.value) {
|
||||
proxy.$message.error('请先在左侧选择科室');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
// 科室id
|
||||
organizationId: organizationId.value,
|
||||
@@ -456,12 +452,13 @@ function handleNodeClick(res, node) {
|
||||
|
||||
// 实际的节点点击处理逻辑
|
||||
function continueHandleNodeClick(node) {
|
||||
// 检查节点是否有子节点
|
||||
if (node.data.children && node.data.children.length > 0) {
|
||||
return;
|
||||
}
|
||||
// 新增按钮是否 disable
|
||||
isAddDisable.value = false;
|
||||
// 检查节点是否有子节点
|
||||
if (node.data.children && node.data.children.length > 0) {
|
||||
// proxy.$message.warning("不能选择父节点");
|
||||
return;
|
||||
}
|
||||
// 选中科室id
|
||||
organizationId.value = node.data.id;
|
||||
// 获取 右侧 table 信息
|
||||
|
||||
@@ -627,10 +627,10 @@ function getList() {
|
||||
pageSize: 100,
|
||||
encounterId: props.patientInfo.encounterId
|
||||
}).then((res) => {
|
||||
console.log('[手术申请] 列表查询 - encounterId:', props.patientInfo.encounterId, '返回记录数:', res.data?.records?.length || 0)
|
||||
surgeryList.value = res.data.records || []
|
||||
}).catch(error => {
|
||||
console.warn('[手术申请] 列表加载失败(可能无权限或接口异常):', error?.message || error)
|
||||
console.error('获取手术列表失败:', error)
|
||||
proxy.$modal.msgError('数据加载失败,请稍后重试')
|
||||
surgeryList.value = []
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
@@ -1127,39 +1127,35 @@ function submitForm() {
|
||||
// 新增手术
|
||||
addSurgery(form.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('手术申请提交成功!')
|
||||
proxy.$modal.msgSuccess(res.msg || '新增成功')
|
||||
// 保存麻醉方式
|
||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||
open.value = false
|
||||
// 延迟刷新列表,确保后端数据已提交
|
||||
setTimeout(() => {
|
||||
getList()
|
||||
}, 300)
|
||||
getList()
|
||||
emit('saved') // 🔧 触发保存事件,通知父组件刷新医嘱列表
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
||||
}
|
||||
}).catch(error => {
|
||||
console.warn('[手术申请] 新增接口异常:', error?.message || error)
|
||||
console.error('新增手术失败:', error)
|
||||
proxy.$modal.msgError('新增手术失败,请检查表单信息')
|
||||
})
|
||||
} else {
|
||||
// 修改手术
|
||||
updateSurgery(form.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('手术申请修改成功!')
|
||||
proxy.$modal.msgSuccess(res.msg || '修改成功')
|
||||
// 保存麻醉方式
|
||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||
open.value = false
|
||||
// 延迟刷新列表,确保后端数据已提交
|
||||
setTimeout(() => {
|
||||
getList()
|
||||
}, 300)
|
||||
getList()
|
||||
emit('saved') // 🔧 触发保存事件,通知父组件刷新医嘱列表
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息')
|
||||
}
|
||||
}).catch(error => {
|
||||
console.warn('[手术申请] 更新接口异常:', error?.message || error)
|
||||
console.error('更新手术失败:', error)
|
||||
proxy.$modal.msgError('更新手术失败,请检查表单信息')
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -151,8 +151,8 @@
|
||||
@saved="() => prescriptionRef?.getListInfo()" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="手术申请" name="surgery">
|
||||
<surgeryApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="surgeryRef"
|
||||
@saved="() => { prescriptionRef?.getListInfo(); surgeryRef?.getList() }" />
|
||||
<surgeryApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="surgeryRef"
|
||||
@saved="() => prescriptionRef?.getListInfo()" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
|
||||
@@ -1404,10 +1404,6 @@ async function handleChargeCharge(row) {
|
||||
|
||||
// 关闭计费弹窗
|
||||
function closeChargeDialog() {
|
||||
// 先关闭子组件中所有悬浮的字典弹窗,避免主弹窗关闭后残留
|
||||
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
|
||||
prescriptionRef.value.closeAllPopovers()
|
||||
}
|
||||
showChargeDialog.value = false
|
||||
chargePatientInfo.value = {}
|
||||
chargeSurgeryInfo.value = {}
|
||||
@@ -1485,6 +1481,8 @@ function handleMedicalAdvice(row) {
|
||||
const filteredItems = res.data.filter(item => {
|
||||
// 匹配 encounterId
|
||||
if (item.encounterId !== row.visitId) return false;
|
||||
// 仅保留药品(adviceType=1),过滤耗材(2)和项目(3)
|
||||
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
|
||||
// 过滤掉名称为空的项目
|
||||
const medicineName = item.adviceName || item.advice_name;
|
||||
if (!medicineName || medicineName.trim() === '') return false;
|
||||
@@ -1747,6 +1745,8 @@ function handleQuoteBilling() {
|
||||
const filteredItems = res.data.filter(item => {
|
||||
// 匹配 encounterId
|
||||
if (item.encounterId !== temporaryPatientInfo.value.visitId) return false;
|
||||
// 仅保留药品(adviceType=1),过滤耗材(2)和项目(3)
|
||||
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
|
||||
// 过滤掉名称为空的项目
|
||||
const medicineName = item.adviceName || item.advice_name;
|
||||
return medicineName && medicineName.trim() !== '';
|
||||
|
||||
Reference in New Issue
Block a user