Compare commits
39 Commits
63a3f63380
...
bug475-fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80695d90f9 | ||
|
|
deb6ade97b | ||
|
|
2d7228ca5d | ||
|
|
a447e55d43 | ||
| 1be0dc2417 | |||
| a4b4d36d93 | |||
|
|
940fad5c7d | ||
|
|
ead3733aac | ||
|
|
28bf385ec2 | ||
|
|
31f7c4f32a | ||
|
|
480663f716 | ||
|
|
cc484d5f10 | ||
|
|
30f8cdbd80 | ||
|
|
f4c6c12ef8 | ||
|
|
8cf98008ae | ||
|
|
062c8d9dee | ||
|
|
ffdfebaacf | ||
|
|
9ed52b7c48 | ||
|
|
fc1ed6c4ce | ||
|
|
818564f5ba | ||
|
|
78adbddfde | ||
|
|
861db6b0f5 | ||
|
|
b7df71fd0b | ||
|
|
5bc8a8e517 | ||
| 0264fa9d58 | |||
| cd12dd7a22 | |||
|
|
bfddf87b2c | ||
|
|
84499d4ec1 | ||
|
|
01c5b62024 | ||
|
|
559821e4d3 | ||
|
|
0dd4c25c12 | ||
|
|
3590a18adc | ||
|
|
b96acc2402 | ||
|
|
e83c35c3f1 | ||
|
|
b5d876be36 | ||
|
|
5539d4cc03 | ||
|
|
982e905990 | ||
|
|
0d46f03e68 | ||
|
|
3cab8306c2 |
@@ -228,8 +228,10 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// 医嘱定义ID集合
|
// 医嘱定义ID集合
|
||||||
List<Long> adviceDefinitionIdList = adviceBaseDtoList.stream().map(AdviceBaseDto::getAdviceDefinitionId)
|
List<Long> adviceDefinitionIdList = adviceBaseDtoList.stream().map(AdviceBaseDto::getAdviceDefinitionId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
// 费用定价主表ID集合
|
// 费用定价主表ID集合(过滤null值,手术项目无定价定义)
|
||||||
List<Long> chargeItemDefinitionIdList = adviceBaseDtoList.stream().map(AdviceBaseDto::getChargeItemDefinitionId)
|
List<Long> chargeItemDefinitionIdList = adviceBaseDtoList.stream()
|
||||||
|
.map(AdviceBaseDto::getChargeItemDefinitionId)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
// 判断是否包含药品或耗材类型(只有这些类型才需要库存相关查询)
|
// 判断是否包含药品或耗材类型(只有这些类型才需要库存相关查询)
|
||||||
@@ -275,9 +277,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
medLocationConfig = Collections.emptyList();
|
medLocationConfig = Collections.emptyList();
|
||||||
allowedLocByCategory = Collections.emptyMap();
|
allowedLocByCategory = Collections.emptyMap();
|
||||||
}
|
}
|
||||||
// 费用定价子表信息 - 使用分批处理避免大量参数问题
|
// 费用定价子表信息 - 仅药品/耗材需要批次定价查询,手术/诊疗无库存概念不需要
|
||||||
List<AdvicePriceDto> childCharge = new ArrayList<>();
|
List<AdvicePriceDto> childCharge = new ArrayList<>();
|
||||||
if (chargeItemDefinitionIdList != null && !chargeItemDefinitionIdList.isEmpty()) {
|
if (hasMedOrDevice && chargeItemDefinitionIdList != null && !chargeItemDefinitionIdList.isEmpty()) {
|
||||||
// 分批处理,每批最多1000个ID,增加批次大小以减少查询次数
|
// 分批处理,每批最多1000个ID,增加批次大小以减少查询次数
|
||||||
int batchSize = 1000;
|
int batchSize = 1000;
|
||||||
for (int i = 0; i < chargeItemDefinitionIdList.size(); i += batchSize) {
|
for (int i = 0; i < chargeItemDefinitionIdList.size(); i += batchSize) {
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public R<?> saveRequestForm(RequestFormSaveDto requestFormSaveDto, String typeCode) {
|
public R<?> saveRequestForm(RequestFormSaveDto requestFormSaveDto, String typeCode) {
|
||||||
|
// 诊疗执行科室配置校验(必须在任何数据库操作之前)
|
||||||
|
List<ActivityOrganizationConfigDto> activityOrganizationConfig =
|
||||||
|
requestFormManageAppMapper.getActivityOrganizationConfig(typeCode);
|
||||||
|
if (activityOrganizationConfig.isEmpty()) {
|
||||||
|
throw new ServiceException("请先配置当前时间段的执行科室");
|
||||||
|
}
|
||||||
|
|
||||||
// 诊疗处方号
|
// 诊疗处方号
|
||||||
String prescriptionNo;
|
String prescriptionNo;
|
||||||
// 申请单ID
|
// 申请单ID
|
||||||
@@ -142,12 +149,6 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
// 诊疗集合
|
// 诊疗集合
|
||||||
List<ActivitySaveDto> activityList = requestFormSaveDto.getActivityList();
|
List<ActivitySaveDto> activityList = requestFormSaveDto.getActivityList();
|
||||||
log.info("保存申请单,typeCode={}, activityListSize={}, encounterId={}", typeCode, activityList != null ? activityList.size() : 0, encounterId);
|
log.info("保存申请单,typeCode={}, activityListSize={}, encounterId={}", typeCode, activityList != null ? activityList.size() : 0, encounterId);
|
||||||
// 诊疗执行科室配置
|
|
||||||
List<ActivityOrganizationConfigDto> activityOrganizationConfig =
|
|
||||||
requestFormManageAppMapper.getActivityOrganizationConfig(typeCode);
|
|
||||||
if (activityOrganizationConfig.isEmpty()) {
|
|
||||||
throw new ServiceException("请先配置当前时间段的执行科室");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ActivitySaveDto activitySaveDto : activityList) {
|
for (ActivitySaveDto activitySaveDto : activityList) {
|
||||||
serviceRequest = new ServiceRequest();
|
serviceRequest = new ServiceRequest();
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class RequestFormManageController {
|
|||||||
@RequestParam(required = false) Long applyDeptId,
|
@RequestParam(required = false) Long applyDeptId,
|
||||||
@RequestParam(defaultValue = "1") Integer pageNo,
|
@RequestParam(defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(defaultValue = "10") Integer pageSize) {
|
@RequestParam(defaultValue = "10") Integer pageSize) {
|
||||||
RequestFormDto dto = new RequestFormDto(surgeryNo, null, applyTimeStart, applyTimeEnd,
|
RequestFormDto dto = new RequestFormDto(surgeryNo, ActivityDefCategory.PROCEDURE.getCode(), applyTimeStart, applyTimeEnd,
|
||||||
mainDoctorId, applyDeptId, pageNo, pageSize);
|
mainDoctorId, applyDeptId, pageNo, pageSize);
|
||||||
return R.ok(iRequestFormManageAppService.getRequestFormPage(dto));
|
return R.ok(iRequestFormManageAppService.getRequestFormPage(dto));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,7 +288,7 @@
|
|||||||
AND T1.refund_device_id IS NULL
|
AND T1.refund_device_id IS NULL
|
||||||
ORDER BY T1.status_enum)
|
ORDER BY T1.status_enum)
|
||||||
UNION ALL
|
UNION ALL
|
||||||
(SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE COALESCE(T1.category_enum, 3) END AS advice_type,
|
(SELECT CASE WHEN T1.category_enum = 4 THEN 6 ELSE 3 END AS advice_type,
|
||||||
T1.id AS request_id,
|
T1.id AS request_id,
|
||||||
T1.id || '-3' AS unique_key,
|
T1.id || '-3' AS unique_key,
|
||||||
T1.requester_id AS requester_id,
|
T1.requester_id AS requester_id,
|
||||||
@@ -373,4 +373,4 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -372,7 +372,6 @@ import {
|
|||||||
} from './diagnosistreatment';
|
} from './diagnosistreatment';
|
||||||
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
||||||
import medicineList from './medicineList.vue';
|
import medicineList from './medicineList.vue';
|
||||||
import MedicineList from '../components/medicineList.vue';
|
|
||||||
import {getCurrentInstance, nextTick, watch} from 'vue';
|
import {getCurrentInstance, nextTick, watch} from 'vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
@@ -467,9 +466,9 @@ function calculateTotalPrice() {
|
|||||||
try {
|
try {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
treatmentItems.value.forEach((item) => {
|
treatmentItems.value.forEach((item) => {
|
||||||
if (item.adviceDefinitionId && item.retailPrice && item.childrenRequestNum) {
|
if (item.adviceDefinitionId && item.adviceDefinitionId !== '') {
|
||||||
const price = parseFloat(item.retailPrice) || 0;
|
const price = Number(item.retailPrice) || 0;
|
||||||
const count = parseInt(item.childrenRequestNum) || 0;
|
const count = Number(item.childrenRequestNum) || 0;
|
||||||
sum += price * count;
|
sum += price * count;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -479,7 +478,10 @@ function calculateTotalPrice() {
|
|||||||
(item) => item.adviceDefinitionId && item.adviceDefinitionId !== ''
|
(item) => item.adviceDefinitionId && item.adviceDefinitionId !== ''
|
||||||
);
|
);
|
||||||
if (hasValidItem) {
|
if (hasValidItem) {
|
||||||
form.value.retailPrice = parseFloat(totalPrice.value);
|
// 使用 nextTick 确保总价更新后零售价才更新,避免 Vue 响应式时序问题
|
||||||
|
nextTick(() => {
|
||||||
|
form.value.retailPrice = parseFloat(totalPrice.value) || 0;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
form.value.retailPrice = undefined;
|
form.value.retailPrice = undefined;
|
||||||
}
|
}
|
||||||
@@ -565,15 +567,16 @@ function edit() {
|
|||||||
form.value.pricingFlag = 1;
|
form.value.pricingFlag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理子项数据,确保包含retailPrice字段
|
// 处理子项数据,确保包含retailPrice和name字段
|
||||||
if (props.item.childrenJson) {
|
if (props.item.childrenJson) {
|
||||||
const parsedItems = JSON.parse(props.item.childrenJson);
|
const parsedItems = JSON.parse(props.item.childrenJson);
|
||||||
treatmentItems.value = parsedItems.map((item) => ({
|
treatmentItems.value = parsedItems.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
name: item.name || '',
|
||||||
retailPrice: item.retailPrice || 0,
|
retailPrice: item.retailPrice || 0,
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 }];
|
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, name: '', retailPrice: 0 }];
|
||||||
}
|
}
|
||||||
form.value.permittedUnitCode = form.value.permittedUnitCode
|
form.value.permittedUnitCode = form.value.permittedUnitCode
|
||||||
? form.value.permittedUnitCode.toString()
|
? form.value.permittedUnitCode.toString()
|
||||||
@@ -618,7 +621,7 @@ function reset() {
|
|||||||
chrgitmLv: undefined, //医保等级
|
chrgitmLv: undefined, //医保等级
|
||||||
pricingFlag: 1, // 划价标记,默认允许划价
|
pricingFlag: 1, // 划价标记,默认允许划价
|
||||||
};
|
};
|
||||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 }];
|
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1, name: '', retailPrice: 0 }];
|
||||||
totalPrice.value = '0.00';
|
totalPrice.value = '0.00';
|
||||||
proxy.resetForm('diagnosisTreatmentRef');
|
proxy.resetForm('diagnosisTreatmentRef');
|
||||||
}
|
}
|
||||||
@@ -760,7 +763,10 @@ function selectRow(row, index) {
|
|||||||
treatmentItems.value[index].adviceDefinitionId = row.id;
|
treatmentItems.value[index].adviceDefinitionId = row.id;
|
||||||
treatmentItems.value[index].retailPrice = row.retailPrice || 0;
|
treatmentItems.value[index].retailPrice = row.retailPrice || 0;
|
||||||
medicineSearchKey.value = '';
|
medicineSearchKey.value = '';
|
||||||
calculateTotalPrice();
|
// 使用 nextTick 确保 DOM 更新后再计算总价
|
||||||
|
nextTick(() => {
|
||||||
|
calculateTotalPrice();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空诊疗子项
|
// 清空诊疗子项
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const emit = defineEmits(['selectRow']);
|
|||||||
const diagnosisTreatmentList = ref([]); // 原始数据列表
|
const diagnosisTreatmentList = ref([]); // 原始数据列表
|
||||||
const filteredList = ref([]); // 过滤后的数据列表
|
const filteredList = ref([]); // 过滤后的数据列表
|
||||||
const hasLoaded = ref(false); // 标记是否已加载数据
|
const hasLoaded = ref(false); // 标记是否已加载数据
|
||||||
|
const isLoading = ref(false); // 标记是否正在加载
|
||||||
|
|
||||||
// 获取诊疗项目列表
|
// 获取诊疗项目列表
|
||||||
function getList() {
|
function getList() {
|
||||||
@@ -53,7 +54,7 @@ function getList() {
|
|||||||
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 })
|
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
diagnosisTreatmentList.value =
|
diagnosisTreatmentList.value =
|
||||||
res.data?.records?.filter((item) => item.childrenJson == null) || [];
|
res.data?.records?.filter((item) => item.childrenJson == null || item.childrenJson === '') || [];
|
||||||
filterList(); // 初始化过滤
|
filterList(); // 初始化过滤
|
||||||
hasLoaded.value = true; // 标记为已加载
|
hasLoaded.value = true; // 标记为已加载
|
||||||
})
|
})
|
||||||
@@ -62,6 +63,47 @@ function getList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 服务端搜索(当用户输入搜索关键词时)
|
||||||
|
function searchList(searchKey) {
|
||||||
|
if (!searchKey || searchKey.trim() === '') return;
|
||||||
|
isLoading.value = true;
|
||||||
|
// 使用较大的pageSize确保搜索结果尽可能多
|
||||||
|
getDiagnosisTreatmentList({ statusEnum: 2, searchKey: searchKey.trim(), pageSize: 5000, pageNo: 1 })
|
||||||
|
.then((res) => {
|
||||||
|
diagnosisTreatmentList.value =
|
||||||
|
res.data?.records?.filter((item) => item.childrenJson == null || item.childrenJson === '') || [];
|
||||||
|
filterList();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('搜索诊疗项目数据失败:', err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
isLoading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取预加载数据(不带搜索关键词时使用)
|
||||||
|
function loadPreloadedData() {
|
||||||
|
if (props.preloadedData && props.preloadedData.length > 0) {
|
||||||
|
diagnosisTreatmentList.value = props.preloadedData;
|
||||||
|
filterList();
|
||||||
|
hasLoaded.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasLoaded.value) return;
|
||||||
|
getDiagnosisTreatmentList({ statusEnum: 2, pageSize: 1000, pageNo: 1 })
|
||||||
|
.then((res) => {
|
||||||
|
diagnosisTreatmentList.value =
|
||||||
|
res.data?.records?.filter((item) => item.childrenJson == null || item.childrenJson === '') || [];
|
||||||
|
filterList();
|
||||||
|
hasLoaded.value = true;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error('获取诊疗项目数据失败:', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 监听shouldLoadData属性变化,仅在首次为true时加载数据
|
// 监听shouldLoadData属性变化,仅在首次为true时加载数据
|
||||||
watch(
|
watch(
|
||||||
() => props.shouldLoadData,
|
() => props.shouldLoadData,
|
||||||
@@ -86,11 +128,17 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
// 监听搜索关键词变化,实时过滤数据
|
// 监听搜索关键词变化,有搜索词时走服务端搜索,否则走本地过滤
|
||||||
watch(
|
watch(
|
||||||
() => props.searchKey,
|
() => props.searchKey,
|
||||||
() => {
|
(newVal) => {
|
||||||
filterList();
|
if (newVal && newVal.trim() !== '') {
|
||||||
|
// 有搜索关键词,走服务端搜索
|
||||||
|
searchList(newVal);
|
||||||
|
} else {
|
||||||
|
// 搜索词为空,使用预加载数据
|
||||||
|
loadPreloadedData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3326,9 +3326,13 @@ function syncGroupFields(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 同步执行科室
|
// 同步执行科室
|
||||||
|
// 🔧 Bug #455: 诊疗类医嘱(adviceType=3)不使用项目配置的执行科室,
|
||||||
|
// 避免配置ID不在机构树中导致显示原始ID,保持患者就诊科室即可
|
||||||
if (row.orgId || row.positionId) {
|
if (row.orgId || row.positionId) {
|
||||||
// 🔧 修复:优先使用项目所属科室(orgId),其次positionId
|
if (Number(row.adviceType) != 3) {
|
||||||
prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId;
|
// 🔧 修复:优先使用项目所属科室(orgId),其次positionId
|
||||||
|
prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步皮试标记
|
// 同步皮试标记
|
||||||
@@ -3412,8 +3416,11 @@ async function setValue(row) {
|
|||||||
showPopover: false, // 确保查询框关闭
|
showPopover: false, // 确保查询框关闭
|
||||||
};
|
};
|
||||||
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: 执行科室默认逻辑:使用positionId(诊疗执行科室配置) → 患者就诊科室,不再使用row.orgId(项目所属科室)
|
// 🔧 Bug #455: 诊疗医嘱(adviceType=3)的执行科室默认使用患者就诊科室,
|
||||||
prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId;
|
// 不使用positionId(诊疗目录配置的执行科室),避免配置ID不在机构树中导致显示原始ID
|
||||||
|
if (Number(row.adviceType) != 3) {
|
||||||
|
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;
|
||||||
prescriptionList.value[rowIndex.value].quantity = row.quantity || 1;
|
prescriptionList.value[rowIndex.value].quantity = row.quantity || 1;
|
||||||
prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value;
|
prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value;
|
||||||
|
|||||||
@@ -72,6 +72,45 @@
|
|||||||
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
<el-input v-model="form.attention" autocomplete="off" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- 申请类型 -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="申请类型" prop="applicationType" style="width: 100%">
|
||||||
|
<el-radio-group v-model="form.applicationType">
|
||||||
|
<el-radio :value="0">普通</el-radio>
|
||||||
|
<el-radio :value="1">急诊</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- 标本类型 -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标本类型" prop="specimenName" style="width: 100%">
|
||||||
|
<el-select v-model="form.specimenName" placeholder="请选择标本类型" style="width: 100%">
|
||||||
|
<el-option label="血液" value="血液" />
|
||||||
|
<el-option label="尿液" value="尿液" />
|
||||||
|
<el-option label="粪便" value="粪便" />
|
||||||
|
<el-option label="痰液" value="痰液" />
|
||||||
|
<el-option label="咽拭子" value="咽拭子" />
|
||||||
|
<el-option label="脑脊液" value="脑脊液" />
|
||||||
|
<el-option label="胸腹水" value="胸腹水" />
|
||||||
|
<el-option label="关节液" value="关节液" />
|
||||||
|
<el-option label="分泌物" value="分泌物" />
|
||||||
|
<el-option label="其他" value="其他" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- 执行时间 -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="执行时间" prop="executeTime" style="width: 100%">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.executeTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择执行时间"
|
||||||
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,6 +191,9 @@ const form = reactive({
|
|||||||
otherDiagnosis: '', // 其他诊断
|
otherDiagnosis: '', // 其他诊断
|
||||||
relatedResult: '', // 相关结果
|
relatedResult: '', // 相关结果
|
||||||
attention: '', // 注意事项
|
attention: '', // 注意事项
|
||||||
|
applicationType: 0, // 申请类型 0-普通 1-急诊
|
||||||
|
specimenName: '血液', // 标本类型
|
||||||
|
executeTime: null, // 执行时间
|
||||||
primaryDiagnosisList: [], //主诊断目录
|
primaryDiagnosisList: [], //主诊断目录
|
||||||
otherDiagnosisList: [], //其他断目录
|
otherDiagnosisList: [], //其他断目录
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,16 +5,14 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="surgery-container">
|
<div class="surgery-container">
|
||||||
<div class="transfer-wrapper">
|
<div v-loading="loading" class="transfer-wrapper" style="min-height: 300px;">
|
||||||
<div v-loading="loading" style="min-height: 300px;">
|
<el-transfer
|
||||||
<el-transfer
|
v-model="transferValue"
|
||||||
v-model="transferValue"
|
:data="applicationList"
|
||||||
:data="applicationList"
|
filter-placeholder="项目代码/名称"
|
||||||
filter-placeholder="项目代码/名称"
|
filterable
|
||||||
filterable
|
:titles="['未选择', '已选择']"
|
||||||
:titles="['未选择', '已选择']"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bloodTransfusion-form">
|
<div class="bloodTransfusion-form">
|
||||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
|
||||||
@@ -103,8 +101,8 @@ const findTreeItem = (list, id) => {
|
|||||||
const emits = defineEmits(['submitOk']);
|
const emits = defineEmits(['submitOk']);
|
||||||
const props = defineProps({});
|
const props = defineProps({});
|
||||||
const state = reactive({});
|
const state = reactive({});
|
||||||
const applicationListAll = ref([]);
|
const applicationListAll = ref();
|
||||||
const applicationList = ref([]);
|
const applicationList = ref();
|
||||||
const orgOptions = ref([]); // 科室选项
|
const orgOptions = ref([]); // 科室选项
|
||||||
const loading = ref(false); // 加载状态
|
const loading = ref(false); // 加载状态
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
|||||||
@@ -1181,19 +1181,27 @@ function handleSave() {
|
|||||||
});
|
});
|
||||||
// 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可
|
// 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
let list = saveList.map((item) => {
|
let list = [];
|
||||||
const parsedContent = JSON.parse(item.contentJson);
|
try {
|
||||||
return {
|
list = saveList.map((item) => {
|
||||||
...parsedContent,
|
const parsedContent = item.contentJson ? JSON.parse(item.contentJson) || {} : {};
|
||||||
adviceType: item.adviceType,
|
return {
|
||||||
requestId: item.requestId,
|
...parsedContent,
|
||||||
dbOpType: '1',
|
adviceType: item.adviceType,
|
||||||
groupId: item.groupId,
|
requestId: item.requestId,
|
||||||
uniqueKey: undefined,
|
dbOpType: '1',
|
||||||
// 确保 therapyEnum 被正确传递
|
groupId: item.groupId,
|
||||||
therapyEnum: parsedContent.therapyEnum || item.therapyEnum || '1',
|
uniqueKey: undefined,
|
||||||
};
|
// 确保 therapyEnum 被正确传递
|
||||||
});
|
therapyEnum: parsedContent.therapyEnum || item.therapyEnum || '1',
|
||||||
|
};
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
loading.value = false;
|
||||||
|
isSaving.value = false;
|
||||||
|
proxy.$modal.msgError('医嘱内容解析失败,请检查待签发医嘱');
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 保存签发按钮
|
// 保存签发按钮
|
||||||
isSaving.value = true;
|
isSaving.value = true;
|
||||||
console.log('签发处方参数:', {
|
console.log('签发处方参数:', {
|
||||||
|
|||||||
@@ -302,6 +302,29 @@ function getSelectRows() {
|
|||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTableRef(index) {
|
||||||
|
return proxy.$refs['tableRef' + index]?.[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAllRows() {
|
||||||
|
prescriptionList.value.forEach((item, index) => {
|
||||||
|
const tableRef = getTableRef(index);
|
||||||
|
if (!tableRef) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item.forEach((row) => {
|
||||||
|
tableRef.toggleRowSelection(row, true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearSelection() {
|
||||||
|
prescriptionList.value.forEach((item, index) => {
|
||||||
|
getTableRef(index)?.clearSelection();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleRateChange(value, item, row) {
|
function handleRateChange(value, item, row) {
|
||||||
// 拼接当前选中时间
|
// 拼接当前选中时间
|
||||||
if (value) {
|
if (value) {
|
||||||
@@ -319,6 +342,8 @@ function handleRateChange(value, item, row) {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
handleGetPrescription,
|
handleGetPrescription,
|
||||||
handleMedicineSummary,
|
handleMedicineSummary,
|
||||||
|
selectAllRows,
|
||||||
|
clearSelection,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="descriptions-item-label">全选:</span>
|
<span class="descriptions-item-label">全选:</span>
|
||||||
<el-switch v-model="chooseAll" @change="handelSwicthChange" />
|
<el-switch
|
||||||
|
v-model="chooseAll"
|
||||||
|
:disabled="isDetails != '1'"
|
||||||
|
@change="handelSwicthChange"
|
||||||
|
/>
|
||||||
<el-button class="ml20 mr20" type="primary" @click="handleExecute"> 汇总领药 </el-button>
|
<el-button class="ml20 mr20" type="primary" @click="handleExecute"> 汇总领药 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -160,24 +164,31 @@ function handleClick(tabName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleGetPrescription() {
|
function handleGetPrescription() {
|
||||||
prescriptionRefs.value.handleGetPrescription();
|
chooseAll.value = false;
|
||||||
|
prescriptionRefs.value?.handleGetPrescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handelSwicthChange() {
|
function handelSwicthChange(value) {
|
||||||
if (chooseAll.value) {
|
if (!prescriptionRefs.value) {
|
||||||
proxy.$refs['prescriptionRefs'].selectAllRows();
|
chooseAll.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (value) {
|
||||||
|
prescriptionRefs.value.selectAllRows();
|
||||||
} else {
|
} else {
|
||||||
proxy.$refs['prescriptionRefs'].clearSelection();
|
prescriptionRefs.value.clearSelection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRadioChange(value) {
|
function handleRadioChange(value) {
|
||||||
|
chooseAll.value = false;
|
||||||
if (value == '1') {
|
if (value == '1') {
|
||||||
handleGetPrescription();
|
handleGetPrescription();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTherapyChange() {
|
function handleTherapyChange() {
|
||||||
|
chooseAll.value = false;
|
||||||
handleGetPrescription();
|
handleGetPrescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,4 +227,4 @@ provide('handleGetPrescription', (value) => {
|
|||||||
:deep(.el-tabs__header) {
|
:deep(.el-tabs__header) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user